SSL - Could not establish trust relationship for the SSL/TLS secure channel.

Oct 7, 2009 at 5:50 PM

Hi Guys,

in my dev environment we have a https site that in BIDs we can pull in the information in no problems. However when we deploy to the server and run using a SQL agent job or as a straight execute we get the following error. The site is using a self cert which has been installed in the local trusted root certificates. Does anybody have any ideas? I've read on the net that a work around for similar problems in .Net apps is to create a certificate policy that accepts the cert - however i take this to mean that I have to drop into the .net code which I'm hoping not to have to do  (

Error below:

System.Net.WebException: 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


Thanks in advance


Oct 13, 2009 at 6:42 AM

Good question, and I have no idea :)  I would take it to mean you would have to drop in .net code as well...

Oct 13, 2009 at 9:14 AM

Yeah - basically I think I need to implement some sort of callback interface so that when the certificate validation occurs this event handler captures it and then returns true. Ideally this would be some sort of option in the interface (Ignore SSL Cert Errors) because I'd imagine lots of people will hit this exact same challenge when working in preprod/dev environments. So I know what to do - in theory - but I'm just a lowly SQL Dev so putting this into practice is proving somewhat overwhelming for me at this point in time. Any tips and pointers on how to do this would be greatly appreciated. Certainly step one would be just to implement the interface (but which interface, where???) and then step two would be to make this a parameter.



p.s Big shoutout to all the people who put this together - it rocks my world and has solved so many of my sharepoint challenges and opened up so many opportunities for us to capture simple additional datapoints for reporting in our BI environment!!

Oct 29, 2010 at 4:51 AM

I am brand new to this.  I am trying to import a list from Sharepoint 2007 to SQL Server 2005 using the SharePoint List Source and getting the same error as above.

"Could not establish trust relationship for the SSL/TLS secure channel with autority..."

Was there a resolution?  I have noticed there is no where for me to enter authenitcation credentials when using the task,

Regards, Corey.

May 3, 2012 at 8:05 PM
Edited May 3, 2012 at 8:08 PM

Is this issue still unresolved? I have it today, also.