Return inner exception from asp.net

A

a_newcomb

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.
 
B

Bruce Barker

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)
 
G

gorf

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top