Reputation: 2440
I have configured IIS with SSL and also set the client certificate to "Accept" But, when I try to accept the web page, the browser does not prompt for client certificate.
With this code. var cert = Request.ClientCertificate
But, I don't see any certificate in cert what so ever.
What's missing?
IIS 7.0 - Windows 2008 32 bit - ASP.NET 4.0
Upvotes: 2
Views: 3626
Reputation: 229
URL has to be https which may be obvious to most. It's got me when testing locally on http. I just choose Accept and not require ssl, which is handled with redirects. Also encountered in chrome windows today if no client certificate is installed the prompt did not fire. I believe my android chrome app did prompt without certificates present. Mixed bag. Mac is a whole other experience.
Upvotes: 0
Reputation: 10940
Force the certificate prompt by using the require
for a specific location in web.config:
<location path="Home/CertPrompt">
<system.webServer>
<security>
<access sslFlags="Ssl, SslNegotiateCert" />
</security>
</system.webServer>
</location>
In order to do this, you have to modify your applicationHost.config
like so (access from Deny -> Allow):
<section name="access" overrideModeDefault="Allow" />`
Upvotes: 1