471,618 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

Geting more info from WebException when Status is Unknown Error

My app makes a call to a remote server (about which I know relatively
little) using Webclient.UploadData. This is done once every 51/2 mins
and is called by code within a worker thread. 95% of the time this
works ok and I get a sane response from the server. However, every
night within the same broad time window of 7 hours, I get a relatively
high incidence of WebException's being thrown. The status of this is
"UnknownError". When I try to log the response, i.e. printing out
repsonse.ToString() my error handler throws another exception. I can
only presume this is because response == null. (I am now testing
against response == null). So, where do I start looking for the source
of the error? Under what circumstances will WebClient behave like this?
Will a garbled response from the remote server cause this? I've tried
using a packet sniffer, though the one that I was using HTTPlook
trashed my program and I understand that this is a common problem. Are
there any tried, tested and very reliable packet sniffers out there
that I can use to help me work out what is going on? Anything else I
should look into within my app? There is a limit to how much logging
that can be done on the webserver that I am connecting to; the owners
are doing as much as they can to help.

Is there any significance in the fact that the code that does the
request is on a worker thread? I only mentioned it incase. I'm new to
multithreading and so am not too sure about what sort of things can go
wrong, but one of my coworkers who is well experienced is confident
that it isn't a threading issue.

This has been going on now for about 2 weeks and every nights testing
when I get unhelpful error information is another day lost. So, any
comments / suggestions would be very gratefully received.



Feb 16 '06 #1
2 2255
Fantastic, I seem to have replied to myself somehow by pressing post

Feb 16 '06 #2
Correction: it is on the downloadData method that the issue is ocurring
(I never use UploadData)

Feb 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.