Nick
Nick

Reputation: 1831

Not always receiving client certificate in IIS

We have a ASP.NET web service which needs to receive a client cert from another service. We have configured our cloud service in IIS to "Accept Client certificates" in IIS Manager (we do not have "Require SSL" check marked in the SSL settings of our website). Occasionally when we attempt to get the client certificate in with the following code (Asp.Net):

httpAuthenticationContext.Request.GetClientCertificate();

we get null. This issue is intermittent. Sometimes, GetClientCertificate() returns the expected cert.

Upvotes: 0

Views: 172

Answers (1)

ewitkows
ewitkows

Reputation: 3618

While not this exact issue, we periodically have issues in our Azure implementation of requesting data from a file, database, etc. that we know exists, but fails to return data.

We learned to just wrap these calls with some retry logic, with a brief delay in between. If the calls fail a few times in a row, we throw an error, but for these "transient" issues, sometimes a simple retry will do the trick...

Hope this helps

Upvotes: 0

Related Questions