Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am using following code for accessing certificate from client store.Also i change impersonate=true in web.config.The below code woks fine in my local machine.But in production it fails and no certificate retrieve.Please help me ASAP.And my iis version is greater than 7.0


XML
<pre lang="c#">
<pre lang="cs">
var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly);
int count=store.Certificates.Count;
var certs = store.Certificates.Find(X509FindType.FindBySerialNumber, cert.SerialNumber, true);
 store.Close();</pre>
Posted
Comments
Sudhansu Sekhar Prusty 10-Apr-15 1:25am    
Seems like the same certificate is not installed in your production Environment.
Ganeswar.B 10-Apr-15 7:49am    
YA you are r8...I want to retrieve certificate from client Personal Store.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900