asp.net删除未使用的httpmodules
我正在查看有关asp.net的大量页面的性能建议.具体来说,删除未使用的httpmodules部分:
<httpModules> <add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/> <add name="Session" type="System.Web.SessionState.SessionStateModule"/> <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule"/> <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/> <add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule"/> <add name="RoleManager" type="System.Web.Security.RoleManagerModule"/> <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule"/> <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule"/> <add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule"/> <add name="Profile" type="System.Web.Profile.ProfileModule"/> <add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule,System.Web.Mobile,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/> <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule,System.ServiceModel,Version=3.0.0.0,PublicKeyToken=b77a5c561934e089"/> </httpModules> 这里列出了大量的HTTP模块,我非常肯定,并非所有这些都被您的应用程序使用.删除未使用的HTTP模块肯定会带来轻微的性能提升,因为执行的工作量会减少.假设在应用程序中不需要Windows身份验证.要删除继承的设置,请在web.config应用程序的httpModules部分下添加一个remove元素,并指定不需要的模块的名称. <httpModules> <remove name="WindowsAuthentication" /> </httpModules> 有没有人知道哪里有各自的描述,有些是显而易见但不是全部,我已经在谷歌上已经有一段时间了. 解决方法
通过Mads Kristensen的博客,来自ScottGu的评论.
http://madskristensen.net.web7.reliabledomainspace.com/post/Remove-default-HTTP-modules-in-ASPNET.aspx
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net – 我可以在global.asax.cs中访问虚拟目录名吗?
- asp.net文件上传解决方案(图片上传、单文件上传、多文件上
- asp.net-mvc-4 – mvc4捆绑强类型捆绑包
- asp.net创建helloWord
- ASP.NET中读取XML文件信息的4种方法与示例代码
- ASP.NET MVC与Webforms与HTTP处理程序(.ashx) – 哪个是最轻
- asp.net-mvc-3 – MVC 3 $.ajax – 响应似乎是从部分视图缓
- asp.net-mvc – 在TryUpdateModel之前更新值提供程序
- asp.net – 使用Web部署参数时,使用web.config中的默认值
- asp.net – Html-Agility-Pack没有加载包含完整内容的页面?