Accept all SSL Certificates...

M

Mirco Kaffsach

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
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top