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

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/

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 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 Sep 5 '14 at 16:00
1

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

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
  • 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. – allegro octopus Sep 8 '14 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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