Isn't that looking in your user store? Another user wouldn't have access to your store. You should be able to store the cert at the machine-level and search for it there.
Main Topics
Browse All TopicsI have an application that is generating the following error:
System.ComponentModel.Win3
at Microsoft.Web.Services2.Se
at Microsoft.Web.Services2.Se
at Microsoft.Web.Services2.Se
at WebProxy.Form1.GetSecurity
Form1.cs:line 518
at WebProxy.Form1.postFiles(S
Here are the relevant lines
132
X509SecurityToken signatureToken = GetSecurityToken();
public X509SecurityToken GetSecurityToken()
//This routine signs the file with the Aircheck Certificate
{
X509SecurityToken securityToken = null;
//X509CertificateStore store = X509CertificateStore.Curre
X509CertificateStore store = X509CertificateStore.Local
bool open = store.OpenRead();
try
{
X509CertificateCollection certs = store.FindCertificateBySub
Microsoft.Web.Services2.Se
if (cert == null)
{
MessageBox.Show(
"You chose not to select an X.509 " +
"certificate for signing your messages.");
securityToken = null;
}
LINE 518 else if (!cert.SupportsDigitalSign
(cert.Key == null))
{
MessageBox.Show(
"The certificate must support digital " +
"signatures and have a private key available.");
securityToken = null;
}
else
{
securityToken = new X509SecurityToken(cert);
}
}
finally
{
if (store != null)
store.Close();
}
return securityToken;
}
This application is stored on our web server and one must log in to the server to access it.
This works absolutely fine when I log in. The certificates are located in the LocalMachineStore.
If anyone but me logs in, even other sytem administrators, it generates the error above.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
A bunch of ideas...
One thing this article mentions is that if you install a cert in the local machine store, only YOU and ADMINS can access it. This doesn't explain the fact that your admins can't access it, though.
http://msdn.microsoft.com/
Are you using cert chaining? Is it possible that the root of this cert is stored in your user store? Or, can you remove the chaining and reimport the cert?
Wouldn't this code run under the account that's running the web service?
The exception seems to point to the line "cert.Key == null))" as the point of failure - I think. You don't have a catch, and the text "at Microsoft.Web.Services2.Se
Another idea: is the cert password protected?
This is the error I'm receiving. The file is SENT just fine, when the return comes back, this is what I get.
I changed this in the app.config file:
<security>
<x509 storeLocation="LocalMachin
</security>
It used to be CurrentUser.
I also changed the approriate stores in my code. The certificate is in the Personal folder of the LocalMachine store.
The only issue is when I installed from the .pfx I wasn't given the option to place in any store that wasn't in the current user directory. I had to export using the mmc, and I clicked yes to export the private key.
Business Accounts
Answer for Membership
by: AlemusPosted on 2009-08-03 at 14:23:19ID: 25008766
Points bump