首页 > 解决方案 > WebService 中间件,如 MVC 中的 ActionFilter

问题描述

我将 ASMX WebService 声明为

[ WebService
          (
          Namespace = "http://www.namespaceuri.com/WebService/ws",
          Description   = "The Web Service Description."
          )
]
public class WebService: System.Web.Services.WebService
{
   [WebMethod]
   public string WebServiceMethod(){}

我想在 web 服务方法执行之前和 web 服务方法执行之后拦截上下文。

MVC 有很好的机制IActionFilter,在 WCF 中是IOperationInvoker,那么我应该在 asmx 服务中使用什么?

标签: c#asp.netasmx

解决方案


推荐阅读