HTTP SSL Request on Compact Framework 1.1

R

rpatel4

I'm running code on a smartphone, and I'm trying to do an HTTP request
to an SSL site. I've tried a whole bunch of variations to the below
and I can't seem to get it to work. It keeps seem to throw an
exception at the Request.GetResponse() line

HttpWebRequest Request = (HttpWebRequest)HttpWebRequest.Create
(@"https://www.server.com/page.php");
Request.ContentType = "text/html";

Request.Proxy = new WebProxy(@"http://wireless.cingular.com:80");
HttpWebResponse GetWebResponse =
(HttpWebResponse)Request.GetResponse();
GetWebResponse.Close();
Stream tmp2 = GetWebResponse.GetResponseStream();
String s2 = tmp2.ToString();

My code runs fine if the site is not http, and runs fine on some https
sites (like https://www.verisign.com)
 
R

rpatel4

ok, I think this may have something to do with my certificate not being
from a verified source. If this is the case, is there an easy way to
get HttpWebRequest to take/use the certificate always?
 

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