开发者

.NET equivalent of Java Servlet Filters

开发者 https://www.devze.com 2023-02-20 00:42 出处:网络
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.NE

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

精彩评论

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