1
votes

I have developed an application of share point. I am using web services for that.

the problem is that while working with my app sometimes i get some exceptions. like,

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.

Stack Strace :: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at ......... my methods

From this exception i cannot understand the main problem. While developing i can debug the code, but now my application is getting launched..i can get error log file from my client which contains this type of excetions.

But how to catch exact error.???

Thanks.

2

2 Answers

0
votes

One way is to set customErrors to On in your web.config file.

There is a good discussion in the comments of this article - SoapException sucks - about different ways to get the detail of exception thrown within SOAP methods.

0
votes

Have you analyzed what the innerException contains ?

try
{
 // do your web server thingies here
}
catch (SoapServerException ssx)
{
 if (ssx.InnerException != null)
 {
  string message = ssx.InnerException.Message;
 }
}

Regards,

Magnus