473,404 Members | 2,178 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,404 software developers and data experts.

Return inner exception from asp.net

I am using a HttpWebRequest object to a custom webhandler. When
processing the request on the server side, I need to return exceptions
to the web request. Whenever the exceptions are thrown, web request
always receivesSystem.Net.WebException: The remote server returned an
error: (500) Internal Server Error.

Is it possible to return the actual thrown exception, or to have the
WebException contain the inner exception that was initially thrown?

thanks,
-a.n.

Nov 19 '05 #1
2 1090
if you use the SOAP interface you get this for free. but you can copy the
techinque. when you web handler detects and error, it should xml serialize
the exception, and return it in response. then when your resquester detcts a
500, error, it deserializes the xml to an exception and thows it
-- bruce (sqlwork.com)
<a_*******@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I am using a HttpWebRequest object to a custom webhandler. When
processing the request on the server side, I need to return exceptions
to the web request. Whenever the exceptions are thrown, web request
always receivesSystem.Net.WebException: The remote server returned an
error: (500) Internal Server Error.

Is it possible to return the actual thrown exception, or to have the
WebException contain the inner exception that was initially thrown?

thanks,
-a.n.

Nov 19 '05 #2
Bruce,
thanks for the response, I get the idea. Can you please expand on " if
you use the SOAP interface you get this for free." Does this mean
throwing soap exceptions or were you implying something else?

thanks,
-a.n.

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 19 '05 #3

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

Similar topics

3
by: Lekyan | last post by:
I have problem setting the password for an ADAM user using C#. I used the SetPassword code given in the Microsoft page, changed several parameters, but ran into an exception. I wonder if other...
1
by: stuart | last post by:
Hi, Is it possible to find out if an exception has an inner exception or not. for example if I catch an exception of type "System.Web.HttpException" it is likely (but not definate) that the...
2
by: Sue | last post by:
I've got a simple Application_OnError routine set up as a generic error trap for web applications running on IIS server (VS 2003) that logs error info and the text of the first inner exception....
3
by: JohnDeHope3 | last post by:
First let me say that I understand that Asp.Net wraps my exception in an HttpUnhandledException. I have found a lot of discussion about that on the web, which was informative, but not helpful. Let...
3
by: Yusuff | last post by:
Hi, I Have created an external assembly to generate a GUID. The class is static. I am trying to access it in the Message Assignment shape in the orchestration. It seems that I can access the...
2
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post by:
Please see the follow code, I can not catch the exception " IOError" raised from shutil.copyfile() , why? try: if (DEST_TYPE & TYPE_FTP): fn = oname ftpc.UploadFile(f, fn) else: fn =...
0
by: harshal.borade | last post by:
I am using XmlSerializer with XmlAttributeOverrides. The XmlAttributeOverrides are used for properties which hold element/s derived from "AbstractMessage" type. ...
3
by: Will McGugan | last post by:
Hi, Can anyone suggest a likely cause for the following exception... Exception exceptions.SystemError: 'error return without exception set' in <generator object at 0x0345CF30ignored Thanks...
5
by: Thomas Guettler | last post by:
Hi, How can you get the traceback of the inner exception? try: try: import does_not_exit except ImportError: raise Exception("something wrong") except:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.