When configuring client certificate authentication in IIS for a .NET Core web application, setting the sslFlags
in the web.config
to Ssl, SslNegotiateCert
should enable SSL and client certificate negotiation. However, if the site fails to load after adding this configuration, here are several troubleshooting steps and potential solutions:
- Check IIS Configuration
- SSL Certificate: Ensure that the SSL certificate is correctly bound to the site in IIS. If the binding is incorrect or the certificate is invalid, it can prevent the site from loading.
- Client Certificates: Verify that the client certificate settings in IIS are configured to accept client certificates. Navigate to your site in IIS Manager, select "SSL Settings," and make sure the option "Require SSL" is checked and "Accept" or "Require" client certificates is selected.
- Review the
web.config
Ensure your web.config
file has the correct configuration for the application. A minimal example might look like this:
<configuration>
<system.webServer>
<security>
<access sslFlags="Ssl, SslNegotiateCert" />
</security>
</system.webServer>
</configuration>
- Event Viewer Logs
- Even though you mentioned there are no logs in the application or system log, double-check the Event Viewer for any relevant logs under Windows Logs > Application and Windows Logs > System. Sometimes IIS logs critical issues that can help diagnose the problem.
If my answer is helpful to you, you can accept it. Thank you.