看看 ASP.NET 项目中有哪些 HttpModule 在工作……
[ 2006-08-09 23:27:59 | 作者: yuhen ]
HttpApplication app = HttpContext.Current.ApplicationInstance;
foreach (string m in app.Modules.AllKeys)
app.Response.Write(app.Modules[m].ToString() + "<br>"); 输出(ASP.NET 2.0)
System.Web.Caching.OutputCacheModule
System.Web.SessionState.SessionStateModule
System.Web.Security.WindowsAuthenticationModule
System.Web.Security.FormsAuthenticationModule
System.Web.Security.PassportAuthenticationModule
System.Web.Security.RoleManagerModule
System.Web.Security.UrlAuthorizationModule
System.Web.Security.FileAuthorizationModule
System.Web.Security.AnonymousIdentificationModule
System.Web.Profile.ProfileModule
System.Web.Mobile.ErrorHandlerModule
System.Web.Security.DefaultAuthenticationModule
东西还不少,Windows验证、Forms验证、Passport验证,连那个角色授权(System.Web.Security.Roles)都是内置的。晕~~~~
请注意,HttpApplication 和 HttpApplicationState 不是一回事。后者用来保存 ASP.NET 应用程序中多个会话和请求之间的全局信息共享,就是 Page.Application 和 HttpContext.Current.Application。
[最后修改由 yuhen, 于 2006-08-11 18:26:32]
评论Feed: http://www.rainsts.net/feed.asp?q=comment&id=278
这篇日志没有评论。






