Intermittent Web Exception

I have been searching the internet now for about 2 days trying to find a solution to my problem. I am hoping and praying someone can help me out. I have an application in which I am using HttpWebRequest to post information to a web server that I wrote. I have several clients across the country using the client software to post information to the server but only one of them is experiencing the problem. About one or twice a day they get an error using the HttpWebRequest which says "Unable to connect to the remote server" at System.Net.HttpWebRequest.GetRequestStream(). I know for a fact that the server is not rejecting the request because as soon as the error occurs I have an error handling routine that posts the error to my server. This is how I know when and where errors occur in the application. Below is some other information that might be useful.

1. I am using .Net Framework 2.0
2. The application is in heavy use with regard to posting information but the error only occurrs a couple of times per day.
3. There is no proxy server at the client site
4. I am using a IP address and not a domain name for the URL that I am posting to.

5. I have set KeepAlive to False

What do you think could be happening? Can you please help point me in the right direction to solve this problem. If there is any other information that I can provide please let me know. Your assistance in this matter would greatly be appreciated.

Thanks,
AD

[1504 byte] By [AD3289] at [2008-1-6]
# 1

Is it possible this to be caused by disruptions in your client's internet connectivity? That is one option I can think of...

What you can do is ask your client to get a System.Net trace log or a Netmon sniff and then look at the traffic and see what is happening on the wire.

Instructions on how to get those can be found here:

http://blogs.msdn.com/dgorti/archive/2005/09/18/471003.aspx

http://blogs.msdn.com/dgorti/archive/2005/10/29/486887.aspx

Mariya

MariyaAtanasova-MSFT at 2007-10-2 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 2

Mariya,

Thanks for your response. I have reveiwed the articles that you mentioned and I am currently trying to build a trace log with System.Net. Do you have experience in building a trace log with System.Net specifically with the TraceSource class. I want to build it programmatically and not have to rely on a configuration file. Also I would like to be able to start and stop the tracing so this way I will only need to capture the trace when the error occurs.

Thanks,

Ashley

AD3289 at 2007-10-2 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 3

I haven't looked at the TraceSource class. Here is the list of available forums you can look into to answer questions about trace logging

http://forums.microsoft.com/MSDN/default.aspx?SiteID=1

Thanks

Mariya

MariyaAtanasova-MSFT at 2007-10-2 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...

.NET Development

Site Classified