在ASP.NET中使用SOAP Extensions捕获WebService异常
2014-12-29 15:36
405 查看
原文:在ASP.NET中使用SOAP Extensions捕获WebService异常Application_Error不能捕获的异常
调试:
如果使用VS直接运行调试asmx,是不可以的.(因为...它不是一个完整的SOAP请求.)可使用WebServiceStudio.
相关地址:http://www.codeplex.com/WebserviceStudio
参考文章:
Using SOAP Extensions in ASP.NET
Handling and Throwing Exceptions in XML Web Services
How to create a global exception handler for a Web Service
[WebMethod] public string HelloWorld() { throw new Exception("this exption can't be handled by Application_Error Method"); return "Hello World"; }
定义Application_Error将不能捕获这个异常.
原因需要了解一下SOAP请求的在ASP.NET的生命周期.
<webServices> <soapExtensionTypes> <add type="Elplan.App.SoapExceptionHandler, Elplan.App" priority="1" group="High" /> </soapExtensionTypes> </webServices>
调试:
如果使用VS直接运行调试asmx,是不可以的.(因为...它不是一个完整的SOAP请求.)可使用WebServiceStudio.
相关地址:http://www.codeplex.com/WebserviceStudio
参考文章:
Using SOAP Extensions in ASP.NET
Handling and Throwing Exceptions in XML Web Services
How to create a global exception handler for a Web Service
相关文章推荐
- 在ASP.NET中使用SOAP Extensions捕获WebService异常
- 在ASP.NET中使用SOAP Extensions捕获WebService异常
- asp.net mvc ,asp.net mvc api 中使用全局过滤器进行异常捕获记录
- 项目开发中的一些注意事项以及技巧总结 基于Repository模式设计项目架构—你可以参考的项目架构设计 Asp.Net Core中使用RSA加密 EF Core中的多对多映射如何实现? asp.net core下的如何给网站做安全设置 获取服务端https证书 Js异常捕获
- 使用ASP.Net Forms模式实现WebService身份验证
- 第三部分 01 使用ASP.NET AJAX异步调用WebService(全)
- ASP.NET WebService 使用Session
- 使用ASP.Net Forms模式实现WebService身份验证
- 使用ASP.Net Forms模式实现WebService身份验证
- 在ASP.NET WebService 中如何使用 WebMethod 属性
- 使用ASP.Net Forms模式实现WebService身份验证 (转)
- 使用ASP.Net Forms模式实现WebService身份验证
- asp.net webservice 概述与使用
- ASP.NET 中数据库操作之-添加-更新-删除和异常捕获。
- 捕获ASP.NET程序发生的异常
- asp.net使用ajax后判断出现异常原因的自定义方法
- 使用ASP.NET AJAX调用后台WebService优化网站性能实例
- 使用ASP.Net Forms模式实现WebService身份验证
- 使用ASP.Net Forms模式实现WebService身份验证
- ASP.NET中使用AJAX后,Session丢失异常的自定义处理。