CF2SP2: https via USR/PWD: Client Certificate Authentication exception

  • Thread starter Benjamin Lukner
  • Start date
B

Benjamin Lukner

Hi!

In short:
Does CF2 throw an exception even if it only receives a certificate?


I have to connect to a customer's host via https.
Due to CF2 not supporting certificates the customer switched from
certificate to username/password authentication.

This works fine in Full Framework (and also CF3.5), but when using CF2
SP2 I get an exception stating that client side certificates are not
supported.

Is there some kind of property I can set to bypass the problem?
Or is the exception always thrown even if only the host sends a
certificate to identify itself (I ignore that certificate)?

I think I included all currently known hacks and workarounds...
The exception is thrown on the last line of the snippet:


const string URL = "xxx";
const string USR = "xxx";
const string PWD = "xxx";
NetworkCredential nc;
HttpWebRequest request;
HttpWebResponse response;
StreamReader sr;
StringBuilder sb;

System.Net.ServicePointManager.CertificatePolicy
= new TrustAllCertificatePolicy();

nc = new System.Net.NetworkCredential(USR, PWD);

request = (HttpWebRequest)HttpWebRequest.Create(URL);
request.Credentials = nc;
request.AllowWriteStreamBuffering = true; //Bug workaround
request.Timeout = 60000;

response = (HttpWebResponse)request.GetResponse();


Kind regards,

Benjamin Lukner
 
B

Benjamin Lukner

Hi,

It's not about the host certificate. I just wondered why it should.

Host sends "This is my certificate, please send yours."
Client SHOULD answer "No, I send username/password instead."

But CF2 answers "I do not support client certificates. I quit."

I think there's no hack to easily bypass that behaviour?

Kind regards,

Benjamin Lukner
 
B

Benjamin Lukner

Hi,

If the https host asks my CF2.0 application for a certificate,
and though it would work if username/password are sent instead,
there is presumably no chance to get it to work?

CF2.0 (SP2) will always throw an exception?

Kind regards,

Benjamin Lukner
 

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