469,902 Members | 2,003 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

catching particular error and display error in label instead of microsoft error page.

121 100+
Hello,
I am making a project in VS2008, C#.
Background of prob:
I have integrated a postcode(UK- its like if someone enters postcode and clicks button to retrieve the address, he gets all the addresses at that postcode(or street in indian language) web service, now the problem is as we go to our client with all of our project in laptop and while giving demo if we click on button we get an error saying :

The request failed with HTTP status 417: Exception failed

Now I know the solution when we have internet connection( just uncheck proxy server in connection and check the server option in) but what I want is when I run this on my laptop instead of getting a filthy error, I should get some msg saying u donít have internet connection( just on some label on that page)

Short words: I want to catch that particular error and display some error in label on that very page so that I can be done manually.

Any help with code will be appreciated.
Thanks in advance
Sep 5 '08 #1
2 1333
Shashi Sadasivan
1,435 Expert 1GB
Have you tried using the try catch around the code which calls the webservice.
If the code enters the catch block, then use it to update your label. !!

The other solution could be to create a custom error page for that errror code you get describing what could cause that error, and what can be done to fix it
Sep 5 '08 #2
jay123
121 100+
Have you tried using the try catch around the code which calls the webservice.
If the code enters the catch block, then use it to update your label. !!

The other solution could be to create a custom error page for that errror code you get describing what could cause that error, and what can be done to fix it
thanks shashi,
i did solve the problem before but using the same way u suggested.
Sep 11 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Peter Frost | last post: by
1 post views Thread by Surjeet Gill | last post: by
12 posts views Thread by Raed Sawalha | last post: by
4 posts views Thread by louise raisbeck | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.