Matt Millican
Matt Millican

Reputation: 4054

Calling a web service with a certificate

I'm trying to connect to a Web Service from .NET. I am referencing the service in my class library.

I've tried importing the certificate (which is a .p12) into the following places

In my Web.config I have the following to set the certificate, but I keep getting an exception back from the web service that says there's no cert.

<clientCredentials>
    <clientCertificate findValue="[email protected]" storeName="My" storeLocation="LocalMachine" x509FindType="FindByIssuerName"/>
</clientCredentials>

If more code is needed, please let me know.

Thanks

Upvotes: 0

Views: 1780

Answers (1)

Tetious
Tetious

Reputation: 123

I think the problem might be that the user IIS is running under doesn't have permissions to the private key in your keystore. When I had this problem in the past, I got a puzzling "not found" exception, when it really was "permission denied."

There is a tool you can use to grant a user permission to access your keystore. You can get the tool and read about it here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384088(v=vs.85).aspx

Upvotes: 2

Related Questions