Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Client certificates mapping and forms authentication

$
0
0

Hello,

I have a problem with client certificates authentication since I've migrate a project from .NET 3.5 to .NET 4.5. I have configure client certificate mapping for my site, it worked fine when my application was in .NET Framework 3.5. But from the moment I've pass it to .NET Framework 4.5, I can't have the form authentication working when client certificate mapping is enable.

The problem is when I try to authenticate in my application, it uses Windows Authentication instead of forms authentication to log in my application cause it uses the windows account attached to the certificate mapping to log in the application, which was not the case before. And then it doesn't recognize my differents roles in the application, so nothing work as expected.

My application is a MVC4 web application, I've migrate it from MVC3 to MVC4 at the same time I've migrate from .NET3.5 to .NET4.5. From this moment, authentication with client certificate mapping enable don't let me use forms authentication.

Here is the authentication configuration in web.config of my application :

<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="20" slidingExpiration="true" />
</authentication>

And here is the configuration of the site in appicationHost.config :

<location path="BSW_AJSwiss">
<system.webServer>
<security>
<access sslFlags="Ssl, SslNegotiateCert" />
<authentication>
<anonymousAuthentication enabled="false" />
<iisClientCertificateMappingAuthentication enabled="true">
<oneToOneMappings>
<add enabled="true" userName="BSW" password="[enc:AesProvider:JaidDgcHffnD8j4eNtPDV5PQ2DCbWvf7Rd+F3UwTJGfMW2adjFKpvTP86XeVyWDe:enc]" certificate="MIIEMTCCAxmgAwIBAgIKYSKTKgAAAAAAAjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDEwdCU1czLUNBMB4XDTEzMDYyMDE0MTcwNFoXDTE4MDYyMDE0MjcwNFowgZYxCzAJBgNVBAYTAlZEMQ8wDQYDVQQIEwZTdWlzc2UxFTATBgNVBAcMDFByw6l2ZXJlbmdlczESMBAGA1UEChMJQWxlcGhsaW5lMQwwCgYDVQQLEwNEZXYxEDAOBgNVBAMTB0FKU3dpc3MxKzApBgkqhkiG9w0BCQEWHHF1ZW50aW4udmluY2VudEBhbGVwaGxpbmUuY2gwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoI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" />
</oneToOneMappings>
</iisClientCertificateMappingAuthentication>
<windowsAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
</location>

The only solution for me now is to disable client certificate mapping, put "Ignore client certificates" in SSL settings and authorize anonymousAuthentication to let my users use the application.

It's now for two days that I'm searching a solution to this problem, I really need your help, please! :)


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>