Password for certificate



I'm trying to talk to a webservice that requires a certificate. I have
generated a .CER file using certmgr.
My code looks like this:

ServicePointManager.ServerCertificateValidationCallback = New
RemoteCertificateValidationCallback(AddressOf ValidateServerCertificate)

certFile = ConfigurationManager.AppSettings.Get("CertificateFile")

password = ConfigurationManager.AppSettings.Get("CertPassword")

certificate = New X509Certificate2(certFile, password)

service.ClientCertificates.Add(certificate)

resultString = service.DoSomething()

However, when my code reaches the line where I actually call the webservice,
I am prompted with a dialog that asks me to enter my password (same as if I'd
used the certificate to log into homebanking etc.).

I would like my application to run in the background, without requiring the
user to enter the password every time the webservice is called.

Any suggestions?
.



Relevant Pages

  • Re: Password for certificate
    ... documentation for the webservice also shows an example where only a .cer file ... What I'm guessing is happening is that you supply the .cer file and .NET ... uses that to locate the matching certificate installed in the local store ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.dotnet.security)
  • https, certificates, and: The underlying connection was closed: An unexpected error occurred on a s
    ... also gave me a .PFX certificate which ive installed via window's MMC ... //costco webservice proxy object ... ....this works on my Windows XP dev machine, as well as on our Windows ... Matt Del Vecchio ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: HELP! WSE Token Manager calling another webservice
    ... certificate.Then, the webservice wants to pass that certificate to ... another webservice but the webservice does NOT have its private key. ... the authentication webservice will never receive a certificate. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Can i cache a WSE X509Certificate ? Is it threadsafe?
    ... I am using WSE2.0 over a secure SSL connection. ... i retreive a certificate from the certificate store. ... To avoid the overhead of retrieving the certificate from the store for each ... // client will invoke the webservice method HelloWorld, ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: ASPNET To Web Service using SSL w/Client Certs
    ... I have gen'd the server cert and applied it to ... webpage or webservice using that machine and user i am prompted for my ... Certificate, i choose the one i gen'd and it works great. ...
    (microsoft.public.dotnet.framework.aspnet)