.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
1.05.2006

 
Bad SSL Certs on Web Service Call
Back in the Verizon Online days (couple jobs ago), we had a C++ COM object that we used to make our HTTP POSTs to the server. In the QA environment, the SSL certs were bogus (server name did not match), so we had a registry key we would look at, and if set, set some parameters on the Win32 API call to ignore the bad cert.

Now at IK we're possibly running into the same thing. We get a .NET WebException when making the web service call. Here is a KB article that shows a work-around: how to accept a bad certificate.

Create a class that implements ICertificatePolicy. Return true from the CheckValidationResult( ) method. Pass this ICertificatePolicy to ServicePointManager.CertificatePolicy before making the web service call.

PRB: "System.Net.WebException. The Underlying Connection Was Closed. Could Not Establish Trust Relationship with Remote Server." Error Message When You Upgrade the .NET Framework


Comments: Post a Comment

Powered by Blogger