ASP.NET Request.ClientCertificate在IIS 7返回空 [英] ASP.NET Request.ClientCertificate returning empty on IIS 7
问题描述
我迁移从IIS 6服务器的web应用程序到IIS 7的服务器和我有一些麻烦与得到客户的证书。
I'm migrating a web app from an IIS 6 server to an IIS 7 server and I'm having some troubles with getting the client's certificate.
这件作品code的,我使用看起来像这样:
The piece of code that I'm using looks like this:
HttpClientCertificate cert = Request.ClientCertificate;
if (cert.IsPresent)
{
...
}
在IIS 6服务器上, cert.Is present
总是正确的。然而,在IIS 7中,它始终是假的。这两项测试分别与IE 8在同一台计算机上完成的。唯一的变化是服务器URL,所以客户应正确进行设置。
On the IIS 6 server, the cert.IsPresent
is always true. However, on the IIS 7 box, it is always false. Both tests were done with IE 8 from the same computer. The only change was the Server URL, so the client should be setup correctly.
我没有得到任何SSL连接错误(我通过 HTTPS
访问页面),我已经设置SSL设置 - >客户端证书:要接受(同IIS 6的配置)。
I'm not getting any SSL connection errors (I'm accessing the page via https
) and I've set the SSL Settings -> Client certificates: to Accept (same as the IIS 6 configuration).
我已经经历了和密切配置IIS 7的服务器,我可以到IIS 6服务器,但我仍然没有得到证书。
I've gone through and configured the IIS 7 server as closely as I could to the IIS 6 server, but I'm still not getting the cert.
是我需要看看配置有其他方面?
Are there other areas that I need to look at for configuration?
另外,如果我设置客户端证书:为必需,我上IIS 7箱403.7错误。我不知道这是否是一种症状,但以防万一的信息是有用的...
Also, if I set the Client certificates: to Required, I get a 403.7 error on the IIS 7 box. I don't know if that is a symptom, but just in case the information is useful...
推荐答案
基本上它归结为一个事实,即客户端无法提供客户端证书。
这就是为什么,当你需要它得到403.7错误。
我相信你需要这样的:
Basically it boils down to the fact that the client can't provide the client certificate. That's why you get the 403.7 error when you require it. I believe you need this:
<一个href=\"http://blogs.msdn.com/b/puneetgupta/archive/2009/08/03/where-is-the-client-certificates-ui-in-iis-7-0.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/puneetgupta/archive/2009/08/03/where-is-the-client-certificates-ui-in-iis-7-0.aspx
请让我知道,如果这有助于。
Please let me know if this helps.
/爸爸
这篇关于ASP.NET Request.ClientCertificate在IIS 7返回空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!