views:

412

answers:

2

I am running my code via debugger in asp.net and it works fine, I can authenticate against the remote web service, and no problems detected.

I then created an installer for my application, and its setup as a virtual directory in IIS7, default website (just for testing)

Now I get this error, when i run the code, and it pulls data from the remote webservice.

System.Web.Services.Protocols.SoapException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Any idea why its doing this, and how can I fix this?

A: 

Hate answering my own posts, but it genuinely is a permission issue.

I will update when I know exactly what permissions are required to read from the certificate store.

JL
A: 

We had the same kind of issue with an internal SSL certificate that was already installed on the IIS server. Still a website running on that machine couldn't access reporting services running on that same machine with SSL, resulting in the same error message you had.

Our sysadmin solved this by installing the internal certificate to the "computer" store like this:

  • Start mmc
  • Add snap-in Certificates
  • Choose ComputerAccount
  • Navigate to Trusted Root Certification Authorities -> Certificates and right-click
  • Choose All tasks-> Import
  • Select your own root-certificate file.

Now it works for us... Hope this helps anyone else reading this.

Tjipke