2

I am trying to updateList items into a sharepoint list from the xml document stored in my shared drive in remote server. To make that work i wrote down a Powershell Script that utilizes Sharepoint Webservices Api Updatelistitems function to perform the acitivity.

I ran the script over in Dev environment it works, Then i went into QA that Works too. At last i am now in PROD and agains ran the script i am now receicing following error:

New-WebServiceProxy : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel

All of my servers dev, QA and PROD web apps are encrypted by Https 443 using Cerified root certificate. Powershell script i am running are mirror copy. System accoutn i am using has owner privileages to sharepoint site and its list.

Am i missing something here, what is blocking this traffic i have no clue.

Thank You

3 Answers 3

1

Try this solution . Worked for me .

http://www.brainlitter.com/2012/03/13/sharepoint-2010-and-cert-trust-could-not-establish-trust-relationship-for-the-ssltls-secure-channel/

1
  • 2
    Please add a summary of the solution to your answer. Link-only answers are not valuable forever as links tend to break.
    – Phil Greer
    Commented Sep 5, 2014 at 16:00
1

Add one line before you create the Web Service Proxy in ps :

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
1
  • that only overshadows the problem we are having. i am looking more of a root cause rather than workaround. Thanks a bunch for you response. Commented Sep 8, 2014 at 13:04
1

Per the other solutions i found for this problem, adding the root certificates for the api I was using by opening the link in a browser, hitting the ssl lock icon, and exporting all the certs in the cert path and adding them to the trusted list in sharepoint central admin WAS NOT the entire solution. i eventually found this link

http://www.epmpartners.com.au/blog/seven-steps-to-correct-the-error-the-root-of-the-certificate-chain-is-not-a-trusted-root-authority-when-in-sharepoint-and-project-server-workflows-2013/

sharepoint keeps its own set of root authority certificates and for the instance of sharepoint i was working with they were not present. to add all the root authority certs from the local machine to the sharepoint instance, according to the link, you can run this script in a powershell on the sharepoint server

foreach ($cert in (Get-ChildItem cert:\LocalMachine\Root)) { if (!$cert.HasPrivateKey) {New-SPTrustedRootAuthority -Name $cert.Thumbprint -Certificate $cert } }

THAT got it to work. hope this saves someone else some time.

1
  • Indeed this worked for me... Commented Dec 10, 2018 at 6:25

Your Answer

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

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