0

I am receiving the error message, "the remote certificate is invalid according to the validation procedure", when I try to make a request. The service is being served on a Weblogic server. I have a certificate issued by the same CA and I have the root certificate plus chain along with the server's certificate.

Before I make the request, I call ServicePointManager.ServerCertificateValidationCallback and then I add the client certificate to the request. This all works but goes wrong when I try to make my request in my winform application. However, as a check, I have typed the url into the browser and it works. So,I am confused as to why I should get this error, when one the certificate has been checked, the server certificate has been validated and the client has been added to the request.

Can someone please help me?

Andy5
  • 2,319
  • 11
  • 45
  • 91
  • Hard to say - does the server depend on SNI? When you say browser, did you you try Internet Explorer? (IE and .NET share the same trust store, FireFox does not). – vcsjones Oct 09 '15 at 19:32
  • checkout some of these answers and suggestion http://stackoverflow.com/questions/2675133/c-sharp-ignore-certificate-errors also do a google search on the following to find other similar reported issues `C# calling ServicePointManager.ServerCertificateValidationCallback winforms application` – MethodMan Oct 09 '15 at 19:36
  • I have used Firefox and added the certificate to its store. When I made the request in the winform application, I grab the certificate from the store. – Andy5 Oct 09 '15 at 19:40
  • Methodman, this is how my validation works – Andy5 Oct 09 '15 at 19:41

1 Answers1

0

Found the problem! The issue was due to the server certificate being issued with the incorrect distinguished name

Andy5
  • 2,319
  • 11
  • 45
  • 91