ASP.NET Request.ClientCertificate returning empty on IIS 7

前端 未结 3 965
暗喜
暗喜 2021-01-18 09:03

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.

The piece of code that I\'m us

3条回答
  •  囚心锁ツ
    2021-01-18 09:39

    I came across this question while looking for more information about how to get certificates in IIS 7 vs. IIS 6. I see that @whosrdaddy's solution worked for the asker. There is something else that I had to hunt down.

    One of the differences between IIS 6 and IIS 7 is that IIS 6 has the "Directory Security" tab in each web site's configuration. In order to make the web server request certificates in IIS 7, you must click on the "SSL Settings" feature for the Web Site or Virtual Directory you are configuration to see the "Client certificates:" setting: Ignore, Accept, or Require.

    Make sure that this is not set to "Ignore", or else you will never get your certificates to work!

提交回复
热议问题