I've seen Common Access Cards (CAC) being read into a program before but I am now modifying a ASP.NET MVC application to use CAC authentication to sign into the app , which I have not done before. There seem to be no straight forward explanations for this issue out there, at least not for someone beginning like myself. My goal is to have the app request the client cert upon opening. Currently I have code to request the cert in a Startup class in the App_Start dir:
HttpClientCertificate cert = Request.ClientCertificate;
cacid = Request.ClientCertificate["SubjectCN"].ToString();
When the app runs I get an empty cert back and cacid (string) comes back as an empty string. I have a cac reader which shows up properly in my managed devices and a card to use. I am so new to this that I may not even know what questions to ask but I'll give it a shot:
Does my site need to be set up in IIS Manager some how? I have Anonymous Auth enabled
Do I need ActivClient or Active Directory to implement or test this? What have I not considered that I need to test that this works properly?