c# - How to implement a ServerCertificateValidationCallback in ASP.NET MVC? -
I would like to add client authentication through X509 certificates, so I have my server IIS SSL and client certificates I want to set up with the requirement. . (As told here :)
But once the client selects the credentials, the answer to the server is always an HTTP 403.
Therefore, to optimize the validity of the client certificate, I Global.asax:
Protected Zero application_Start () {........ ServicePoint Manager. Server Certification Validity Callback + = New Remote Certificate Certification Callback (Valid Certification Certificate); Private static bool valid server certificate (Object Sender, X509 Certificate Certificate, X509 Chen Chain, SSL Policy Errors SSL Policy Errors) {// ... Check Returns Correct; }}
But apparently my function is never called and server response is still 403 denied with permission (certificate unsafe justice).
Do you have any suggestions?
Comments
Post a Comment