This might not be a SharePoint specific issue.

I need to access a non-SharePoint web service from a SharePoint application page. The web service is accessed through two calls, one with a username and password that returns a token, and the second uses that token and returns JSON. The first call uses https, the second http. Same server, different service, I believe. This server is on a different domain than the SharePoint server.

The call fails with "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel". I am able to complete both calls through IE on the SharePoint server.

Edit - this is a SharePoint specific issue - I created a little console app that does the same thing, and it works just fine running on the SharePoint server.

1 Answer 1


You need to register the SSL Certificates for the server hosting the web service in Central Administration.

You don't say which version of SharePoint you're on, but the process is similar for 2010 and 2013:

  • Open Central Admin
  • Click Security > Manage Trust
  • Click New > Upload your SSL cert > Click OK

For additional info see:

Registering and trusting external SSL Certificates in SharePoint 2010

Configure SSL for SharePoint 2013

  • I was able to register the SSL cert for the web service, but the code is still generating the same exception. Jun 24, 2013 at 16:36
  • Did you get the whole chain? A la "The Catch" in the first link Jun 24, 2013 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.