473,320 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Further Exception Identification

Hi All

I am fairly new to C# and the exception classes of Microsoft.Net. I
hope someone can help me. I am trapping exceptions in a web
application and currently reporting the exception detail. Two of the
main exceptions I receive are :
The underlying connection was closed: Unable to connect to the
remote server.
The operation has timed-out.

Both are System.Net.WebException type exceptions. Is there an easy way
for me to distinguish between the two.

Any help would be gratefully received.

Martin Wright

Feb 21 '06 #1
1 1124
Hello, Martin!

M> I am fairly new to C# and the exception classes of Microsoft.Net. I
M> hope someone can help me. I am trapping exceptions in a web
M> application and currently reporting the exception detail. Two of the
M> main exceptions I receive are :
M> The underlying connection was closed: Unable to connect to the
M> remote server.
M> The operation has timed-out.

M> Both are System.Net.WebException type exceptions. Is there an easy way
M> for me to distinguish between the two.

Yes, you can use WebException.Status property, it returns WebExceptionStatus enum.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brad H McCollum | last post by:
I've looked through many suggestions and partial examples all over this newsgroup and still am not coming up with anything that does specifically what I'm wanting to accomplish. I'm writing a VB...
5
by: Carl Ribbegaardh | last post by:
Is there any known list of compiler identification macros? I'm using VS 2003, g++ on windows, sun's cc and g++ on solaris. Is it possible to identify the compiler using macros? I'm aware of WIN32...
23
by: Roel Melchers | last post by:
My ACCESS-database contains all members of my association. When the members attend to a meeting I want to record their presence. When they enter they identify themselves by putting their finger...
5
by: Mike | last post by:
I am relatively new to Web development and I have a pretty simple question. How do I get the web site identification information (from IIS) inside my aspx.cs? Spacifically I want the web pages...
2
by: Bernie Yaeger | last post by:
How do I get the data type of a given column of a datatable? Tx for any help. Bernie Yaeger
2
by: suresh | last post by:
Hello to you all In my .Net application, I want to import document images (Tiff images), having same format, in a batch, For e.g. I have a document folder containing mixed images like...
4
by: robinsand | last post by:
Header File: car.h #if !defined CAR_H #define CAR_H enum TCarType { ctEconomy = 1, ctCompact, ctStandard, ctFullSize, ctMiniVan, ctSUV }; class Car { public: Car();
5
by: EP | last post by:
This inquiry may either turn out to be about the suitability of the SHA-1 (160 bit digest) for file identification, the sha function in Python ... or about some error in my script. Any insight...
1
by: ZZyZX | last post by:
I wish to uniquely identify the below button element embedded among many other button elements in a web page and call the click event on it to automatically navigate to the next page in a sequence...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.