[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Mirco Kaffsach

9/9/2003 1:14:00 PM

Hi @all,

I've got a little problem.

I want to use SSL for my WebService. The authentication works over an
internal unsigned SSL Certificate.
The problem is that the WebService doesn't run over this SSL connection. He
crashes with the message:
Can't create a secure connection to server...

Its the same message you got if you want to make a HttpWebRequest to an
https URL.
But there you can declare that the Request accepts all certificates.

ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy();
sealed class AcceptAllCertificatePolicy : ICertificatePolicy
{
public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate
certificate, WebRequest request, int certificateProblem)
{
// Just accept.
return true;
}
}

But I don't know how to handle this over an WebService.
It's great if anyone could give short hints or samples...

Thanks for your Help

Mirco