D
David W
I am using the following code to send a request to a web site. It works
fine on XP and Vista Home, but on a machine running Vista Business it gives
the error, ConnectFailure. I can browse to the site in IE7 on the same
laptop with no problem. This code works fine on other computers on the same
network. There is a firewall there, but no proxy. Are there any know
issues for this scenario?
-Dave
HttpWebRequest req;
req = (HttpWebRequest)WebRequest.Create("https://" + Global.WebServer +
Global.WebPath + serverUrl);
req.AllowWriteStreamBuffering = true;
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.Timeout = Global.InetTimeout * 1000;
req.SendChunked = true;
req.Proxy = HttpWebRequest.DefaultWebProxy;
ASCIIEncoding encodedData = new ASCIIEncoding();
byte[] btPostData;
btPostData = HttpUtility.UrlEncodeToBytes(encodedData.GetBytes(postData));
Stream reqStream = req.GetRequestStream();
reqStream.Write(btPostData, 0, btPostData.Length);
reqStream.Close();
HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
fine on XP and Vista Home, but on a machine running Vista Business it gives
the error, ConnectFailure. I can browse to the site in IE7 on the same
laptop with no problem. This code works fine on other computers on the same
network. There is a firewall there, but no proxy. Are there any know
issues for this scenario?
-Dave
HttpWebRequest req;
req = (HttpWebRequest)WebRequest.Create("https://" + Global.WebServer +
Global.WebPath + serverUrl);
req.AllowWriteStreamBuffering = true;
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.Timeout = Global.InetTimeout * 1000;
req.SendChunked = true;
req.Proxy = HttpWebRequest.DefaultWebProxy;
ASCIIEncoding encodedData = new ASCIIEncoding();
byte[] btPostData;
btPostData = HttpUtility.UrlEncodeToBytes(encodedData.GetBytes(postData));
Stream reqStream = req.GetRequestStream();
reqStream.Write(btPostData, 0, btPostData.Length);
reqStream.Close();
HttpWebResponse resp = (HttpWebResponse) req.GetResponse();