Accessing SSL remote web service

  • Thread starter Thread starter feol
  • Start date Start date
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.
 
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.
 
Back
Top