I have a program that talks to a webservice with code like this:
ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(AddressOf ValidateServerCertificate)
service.Url = ConfigurationManager.AppSettings.Get("ServiceURL")
Dim certFile As String = ConfigurationManager.AppSettings.Get("CertificateFile")
certificate = X509Certificate.CreateFromCertFile(certFile)
service.ClientCertificates.Add(certificate)
resultString = service.HentGraveanmodninger(False, 5, 1)
When the code hits the last line, I am prompted for a password for the certificate.
I would like to store the password in the app.config, and provide it to the service programmatically.
How can I do this?
Best regards, Kenneth Johnsen.
...
Go to the complete details ...