Accessing SSL remote web service

F

feol

Hi.

I'm accessing a remote web service in two ways: a) with SSL, b) without SSL.
In this second way I have no troubles, but with SSL I'm getting this
exception:

"The underlying connection was closed: Could not establish trust
relationship for the SSL/TLS secure channel. The remote certificate is
invalid according to the validation procedure"

I'm accessing via https://ip-server:port/virtual-dir/webservice.asmx. I have
the certificate installed in my PC. The server is not my localhost.

Thanks.
 
A

Author

feol said:
Hi.

I'm accessing a remote web service in two ways: a) with SSL, b) without SSL.
In this second way I have no troubles, but with SSL I'm getting this
exception:

"The underlying connection was closed: Could not establish trust
relationship for the SSL/TLS secure channel. The remote certificate is
invalid according to the validation procedure"

I'm accessing via https://ip-server:port/virtual-dir/webservice.asmx. I have
the certificate installed in my PC. The server is not my localhost.

Thanks.

there are a lot of articles on this. e.g.:

http://www.eggheadcafe.com/articles/20051104.asp

the basic idea is to implmnt your own certificate policy. in your
case, you trust the remote site, so u don't need to chk the remote
cert, simply accept it, i.e, return true.
 

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

Top