brainimus
brainimus

Reputation: 11026

Default exception handling in web service

In my application I am calling a web service.

try
{
   theWebService.Method(parameter);
}
catch (Exception e)
{
   //This catches and logs a SoapException
}

When I do this the a SoapException is caught and I'm only given a one line sentence on the issue. I'm assuming the SoapException is just relaying information from the actual exception that occurred in the web service (please correct me if I'm wrong about this). Does the web service log the full exception somewhere and if so where? Note that no additional logging has been added to the service besides what comes by default.

Upvotes: 1

Views: 496

Answers (1)

John Saunders
John Saunders

Reputation: 161773

I'll assume you're still using legacy ASMX web services, and not WCF.

SoapException does not just relay the exception from the service. It can also be used to return a SOAP Fault message back to the caller.

By default, an unhandled exception in an ASMX web service will invoke ASP.NET Health Monitoring. By default, this will enter an event in the event log with details about the exception.

Upvotes: 1

Related Questions