IIS 7错误“指定的登录会话不存在。它可能已经被终止。“使用https时 [英] IIS 7 Error "A specified logon session does not exist. It may already have been terminated." when using https

查看:2091
本文介绍了IIS 7错误“指定的登录会话不存在。它可能已经被终止。“使用https时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的asp.net网站创建客户端证书身份验证。

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:


makecert.exe -r -nCN =我的个人CA-pe -sv MyPersonalCA.pvk -a
sha1 - len 2048 -b 01/01/2013 -e 01/01/2023 -cy authority
MyPersonalCA.cer

makecert.exe -r -n "CN=My Personal CA" -pe -sv MyPersonalCA.pvk -a sha1 -len 2048 -b 01/01/2013 -e 01/01/2023 -cy authority MyPersonalCA.cer

然后,我必须将它导入IIS 7,但由于它接受.pfx格式,我首先转换它

Then, I have to import it to IIS 7, but since it accepts the .pfx format, i convert it first

pvk2pfx.exe -pvk MyPersonalCA.pvk -spc MyPersonalCA.cer -pfx MyPersonalCA.pfx

导入MyPersonalCA.pfx后,我尝试将https站点绑定添加到我的网站并选择上面的SSL证书,但我收到以下错误:

After importing MyPersonalCA.pfx, I try to add the https site binding to my Web Site and choose the above as SSL Certificate, but I get the following error:

有任何建议吗?

推荐答案

这必定是某种IIS错误,但我找到了解决方案。

This must be some kind of IIS bug, but I found the solution.

1-从IIS导出 MyPersonalCA.pfx

2-将其转换为 .pem

openssl pkcs12 -in MyPersonalCA.pfx -out MyPersonalCA.pem -nodes

3-将其转换回 .pfx

openssl pkcs12 -export -in MyPersonalCA.pem -inkey MyPersonalCA.pem -out MyPersonalCA.pfx

4-将其导回 IIS

这篇关于IIS 7错误“指定的登录会话不存在。它可能已经被终止。“使用https时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆