How do I handle errors???

M

Mike

All,

I am capturing a SQL constraint exception in my web service and am
attempting to "throw" it back at my asp.net page so I can put up an alert
box. For some reason I lose the contraint error and the web page sees it as
an exception.

How do I pass back the original type of the exception threw my web service?

Where can I find a good article that discuss's how to handle error
processing from web services??

Thanks
Mike
 
S

Sami Vaaraniemi

Mike said:
All,

I am capturing a SQL constraint exception in my web service and am
attempting to "throw" it back at my asp.net page so I can put up an alert
box. For some reason I lose the contraint error and the web page sees it
as
an exception.

How do I pass back the original type of the exception threw my web
service?

Where can I find a good article that discuss's how to handle error
processing from web services??

Thanks
Mike

For interoperability reasons you cannot pass the original exception to the
caller - a java consumer would have no idea what to do with e.g., .NET
SqlClientException.

You can, however, store information about the original exception in the
Detail field of the SoapException. To see how this can be done, check out
this article:
http://www.microsoft.com/belux/nl/msdn/community/columns/jtielens/soapexceptions.mspx .

Regards,
Sami
 
G

Ghislain Tanguay

You can also serialize your SqlConstraintError in the detail of the
SoapException and deserialized it on your aspx. page
 

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,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top