HTTPS and Certificate

C

Chris

Hello.
I have an ASP .NET Application that I have been using
that calls a web service on another machine.

Our company wants to implement HTTPS between the two
applications. I have changed the call to the web service
URL to https://example:8700/example. Now I get a message
indicating:

The underlying connection was closed: Could not establish
trust relationship with remote server.

Does anyone know what I need to do to implement HTTPS? I
have installed the certificate through my browser in a
trusted folder but I can't get my development environment
(Visual Studio) to work. A piece of example code would be
great.

I have seen the same error on many other posts but didn't
see a resolution. Thanks for your help.
 
J

Joe Kaplan \(MVP - ADSI\)

Could it be a problem with the certificate name not matching the URL and the
cert policy causing the failure? I've seen lots of weird cert policy
problems cause failures in the underlying webrequest object that the client
proxy uses.

To combat this, you can create your own ICertificatePolicy class and add it
to the ServicePointManager CertificatePolicy property. I usually have the
CheckValidationResult return true for all cases to start with and then go
from there.

If that fixes the problem, then you know it was a certificate trust issue
that caused the failure.

HTH,

Joe K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,126
Messages
2,570,750
Members
47,308
Latest member
TorriLangr

Latest Threads

Top