C# 如何处理sharepoint web services异常
我开发了一个共享点的应用程序。为此,我正在使用web服务 问题是,在使用我的应用程序时,有时会出现一些异常。 像 类型为“Microsoft.SharePoint.SoapServer.SoapServerException”的异常 被扔了 堆栈策略::在 System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage 消息、WebResponse响应、流 responseStream,布尔异步调用)C# 如何处理sharepoint web services异常,c#,winforms,sharepoint,exception,web-services,C#,Winforms,Sharepoint,Exception,Web Services,我开发了一个共享点的应用程序。为此,我正在使用web服务 问题是,在使用我的应用程序时,有时会出现一些异常。 像 类型为“Microsoft.SharePoint.SoapServer.SoapServerException”的异常 被扔了 堆栈策略::在 System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage 消息、WebResponse响应、流 responseStream,布尔异
在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(字符串 methodName,对象[]参数)位于 ......... 我的方法 从这个例外中,我无法理解主要问题。在开发过程中,我可以调试代码,但现在我的应用程序正在启动。我可以从我的客户端获取错误日志文件,其中包含这种类型的异常 但是如何捕捉准确的错误呢 谢谢。一种方法是在web.config文件中设置为On
在本文的评论中有一个很好的讨论——关于获取SOAP方法中抛出的异常细节的不同方法。您分析过innerException包含什么吗
try
{
// do your web server thingies here
}
catch (SoapServerException ssx)
{
if (ssx.InnerException != null)
{
string message = ssx.InnerException.Message;
}
}
问候,
马格纳斯