Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2007

Tip: Looking for answers? Try searching our database.

HttpWebRequest and Vista Business

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David W - 25 May 2007 20:35 GMT
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();
Bryan Phillips - 27 May 2007 04:59 GMT
There is a weird bug with the built-in firewall functionality in Vista
where it somehow runs out of outbound TCP connections.  Try stopping the
"Base Filtering Engine" service (and any dependent services) and try
running the code again.  If it works, you just ran into the bug.  
Usually, a reboot fixes this rare but annoying problem.  I usually run
into it 1-2 times a month after leaving my laptop running for a few
weeks.

--
Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com
Web Site:  http://www.composablesystems.net

> 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
[quoted text clipped - 21 lines]
> reqStream.Close();
> HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
David W - 06 Jun 2007 16:19 GMT
Arghh, it was Norton internet security.  A trial version of this software
had been preloaded on the laptop.  I can't beleive I didn't check for that -
Norton "IS" the virus and is the first thing I rip off any machine!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.