I am trying to build authentication system through ASP.NET MVC. I am using Identity Server 4 for authentication. I have already implemented user id and password validation through ResourceOwner.
Now I am trying to implement smart card authentication. When I try to read X509Certificate2 in debug mode, I am able to read the client certificates but when I deploy the application to IIS, I am unable to read the certificate.
I want to accept client certificate on my Identity Server hosted on IIS when request is sent to Identity Server 4 from client ASP.NET MVC. My Identity Server 4 project type is .NET Core on .NET Framework.
I have already tried this:
I got the client certificate in Identity Server 4 as below but it was without private key :
var clientX509Certificate = new X509Certificate2(this.HttpContext.Connection.ClientCertificate);