List Info

Thread: Getting more info from WebException when Status is Unknown Error




Getting more info from WebException when Status is Unknown Error
user name
2006-02-17 10:01:35
My app makes a call to a remote server (about which I know
relatively
little) using Webclient.DownloadData. 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 circumsances 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.

Thanks,

Greg.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )