INTRODUCTION
I was in the process of setting up Service Application publishing. I did not know why I did it but anyway in the source farm I updated the certificate for SharePoint Web Services IIS website. This website by default uses the SharePoint Services root certificate. When you update the certificate to your own, you will start having authentication issues on the destination farm that tries to consume/connect to the published service application. The error is something like below:
An operation failed because the following certificate has validation errors:
Subject Name: CN=WMSvc-[SERVERNAME]
Issuer Name: CN=WMSvc-[SERVERNAME]
Thumbprint: A3987F15C3D7A3E21E995832245B951F96565197
Errors:
SSL policy errors have been encountered. Error code ‘0x2’..
Basically the error is saying that your certificate is invalid. Service Application publishing is using the SharePoint Web Services as the proxy. So I now have the mission to revert back to certificate to use the SharePoint Services one.
RESOLUTION
In a nutshell the steps are as follows:
1. Grab the ApplicationID of the SharePoint Web Services IIS website.
2. Add the SharePoint Services certificate to your Personal store. By default this resides in SharePoint Certificates store and if you don’t move it to the Personal store you may get 1312 error which I will explain later.
3. Then use netsh command to re-assign the certificate back to the SharePoint Web Services website.
So in detail please follow the following:
Grab the ApplicationID
– Go to Command Prompt, open it with “Run as Administrator”
– Then run:
netsh http show sslcert
This will show you ALL IIS websites that listen on HTTPS protocol. You want to grab the ApplicationID for the 0.0.0.0:32844 which is the SharePoint Web Services’ one. If somehow the website is not listed, simply go to IIS and assign a self-signed certificate to the SharePoint Web Services then re-run the command.
Copy and paste Application ID into Notepad.
Add the SharePoint Services certificate to your Personal store
– Open command prompt and run mmc.exe.
– Then add snap-in for the Certificates of Local Computer account.
– Then go to SharePoint > Certificates node.
– Export the SharePoint Services certificate including the private key to your local drive.
– Then go to Personal > Certificates node and import the SharePoint Services certificate you’ve exported from your local drive.
– After you’ve imported back, go to the SharePoint Services certificate details page by double-clicking the certificate. Then go to Details tab. You want to go to the Thumbprint section. Copy and paste the value into Notepad but remove all the spaces such as below:
c4be09de84f708f8549d32c55ef298e0b3f7ab93
NOTE: Some other blog posts I’ve found on the net tell you to get the Thumbprint directly from the SharePoint Services cert located in SharePoint > Certificates store. I did that and somehow I get error 1312 Parameter is incorrect.
Run netsh command to re-assign certificate
– This is the last step. Open command prompt again “As Administrator”.
– Then run:
netsh http add sslcert ipport=0.0.0:32844 certhash=<thumbprint> appid=<application ID>
eg.
netsh http add sslcert ipport=0.0.0:32844 certhash=c4be09de84f708f8549d32c55ef298e0b3f7ab93 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}
That’s it! Now your SharePoint Web Services IIS website uses the correct certificate again.
Hope this helps,
Tommy
We provides you the best Services in our themes.
Click on the link below to see a full list of clients which we have developed solutions and provided consultancy for.
We are solution-centered and not application-centered.
Being creative and having fun and yet still delivering a fantastic service is the center of our values.
TFS Consulting Services guarantees delivery that is within budget and deadline or you engage us for free.
Implementing IT solution does not have to be difficult. TFS Consulting Services has a lot of resources on planning and methodologies that will ensure successful delivery of your IT solution. TFS Consulting Services has been around in the web industry for more than 10 years and has experienced all the successes and failures of various type of IT deployment.
Do you need a technical resource? TFS Consulting Services can also provide you with technical resource for developing ASP.NET (C# and VB.NET), SharePoint (2003, 2007, 2010, 2013) and MS CRM applications. Our resource is an Microsoft Certified Personnel (MVP) and Microsoft Certified Technology Specialist (MCTS) in all ASP.NET, SharePoint and CRM.
Make sure your IT implementation is robust and scalable. TFS Consulting Services can provide consulting and advice on industry’s best practice on various web-related areas such as website security, design and usability, application-specific (such as SharePoint)’s best practice, Search Engine Optimisation (SEO), coding standards and many others.
Finally TFS Consulting Services provides you with solution development service. We mainly work with Microsoft technologies (ie. .NET and SQL Server), however we are also capable of developing with PHP and MySQL. If you ever need any business process automation, integration and solution development work, we are the trusted expert you should go to.
For more detailed service offerings please visit our Solutions page.
Tommy Segoro
tommy@tfsconsulting.com.au
+61 404 457 754
© TFS Consulting Services 2024. All rights reserved.