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)
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)