Skip to main content
GameDev.net gamedev.net
🔒 Locked

[.net] HttpWebRequest & HttpWebResponse

Started by ArchG Oct 13, 2005 at 5:51 PM 1 replies 400+ views
Original Post
ArchG
ArchG
Hello, Our company uses a custom build link checker (made with .net framework 2.0 and C#) to check our websites for bad links.. if you use the checker to check one link at a time, the links come up fine...but for some reason...if we have the link checker run constantly (like have it open up the files, extract the links, and check them all in a row) about 30% of them or so will come up with errors...mostly timeout errors...even if i set the timeout to over 90 seconds. Does anyone know what might cause this? Do I have to clear something after sending a request or something...? Why do I get responses when i do one at a time, but not if i do a whole bunch? If you want me to post the code for it, I will. Thanks, ArchG
[ Newbies Network ]
DMatovich
DMatovich
Are you using multiple connections simultaneously, using either multiple threads or select (IIRC it's Poll, haven't used it in a bit). I've noticed that often times using multiple sockets at the same time with rapid connect/disconnects seems to cause some socket's to just "freeze" and fail with connect timeout.
-Dave
ArchG
ArchG
Actually no, i'm not doing any Multi-threading or polling or anything like that..

I even added in a 1 second thread sleep between each link it checks..still the same problem...

This is really confusing me, and not making any sense. How would I get the 200 OK status message when checking the links manually..but then when the automatic checker does it, it timesout? (again, this doesn't happen with all of them..just about a 1/3 of them)...which makes it hard because half the links that i check then end up being good links..

Thanks for your response DMatovich, if you have any other ideas of why this might be happening please let me know.
Ratings+

ArchG

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.