IIS 7 Error “A specified logon session does not exist. It may already have been terminated.” when using https

后端 未结 19 909
情书的邮戳
情书的邮戳 2021-01-30 19:58

I am trying to create Client Certificates Authentication for my asp.net Website.

In order to create client certificates, I need to create a Certificate Authority first:<

19条回答
  •  醉话见心
    2021-01-30 20:17

    I ran across this same issue, but fixed it a different way. I believe the account I was using changed from the time I initially attempted to set up the certificate to the time where I returned to finish the work, thus creating the issue. What the issue is, I don't know, but I suspect it has to do with some sort of hash from the current user and that is inconsistent in some scenarios as the user is modified or recreated, etc.

    To fix it, I ripped out of both IIS and the Certificates snap-in (for Current User and Local Computer) all references of the certificate in question:

    IIS certificates

    mmc.exe --> add/remove snap-ins, choose certificates then local computer or current user

    Next, I imported the *.pfx file into the certs snap-in in MMC, placing it in the Local Computer\Personal node:

    1. Right-click the Certificates node under Personal (under Local Computer as the root)
    2. All Tasks -> Import
    3. Go through the Wizard to import your *.pfx

    From that point, I was able to return to IIS and find it in the Server Certificates. Finally, I went to my site, edited the bindings and selected the correct certificate. It worked because the user was consistent throughout the process.

    To the point mentioned in another answer, you shouldn't have to resort to marking it as exportable as that's a major security issue. You're effectively allowing anyone who can get to the box with a similar set of permissions to take your cert with them and import it anywhere else. Obviously that's not optimal.

提交回复
热议问题