开发者

.NET equivalent of Java Servlet Filters

Is there a .NET equivalent 开发者_JS百科to using Servlet Filters for request pre-processing in .NET?


You should create an HttpModule and handle the HttpApplication events (Probably BeginRequest).


ASP.NET MVC provides just such a filter API, along with a set of out-of-the-box filters for validation, authorization, and other common pre- or post-processing needs. Here is an introductory tutorial:

http://www.asp.net/mvc/tutorials/understanding-action-filters-cs

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜