Search code examples
c#client-certificates

How to get the Application id of an assembly


SO lately i have been struggling to get owin package to run with https. After discovering owin.forcehttps it still doesn't work, however since i learned that even for testing and localhost certificates are required i searched on how ti install a certificate and bind it to that application. So far i think i have found the right resource for that, however it says that you bind ip and port to thumbprint of the cert and the application id which looks kinda obvious to me.

At this point i'm struggling on how to get the application id. When googling you can get it trough file explorer and or trough powershell but this only seems to work with installed apps. Since this is going to be a module of an application and not an installable application how am i able to get an application id of the exe (which will be reference to the main application)? I already signed my assembly.

Edit:

resource to binding ssl certificate binding ssl certificate


Solution

  • Are you talking about the http.sys application ID field? If so, it is not used. Just make up a random GUID.

    For example:

    $"appid={Guid.NewGuid()}"
    

    I think the intent of the field is to act as a sentinel to the owning application. For example, imagine two applications both trying to “own” the same port. If the config tool from one is used, but doesn’t find its hard coded appid, it can alert that the config has been changed by a different app.