web.config配置
在config中配置自己项目中的用户控件:
<pages> <controls> <add tagPrefix= "fish" tagName= "MainMenu" src= "~/Controls/MainMenu.ascx" /> <add tagPrefix= "fish" tagName= "PageHeader" src= "~/Controls/PageHeader.ascx" /> </controls> </pages> |
在config中配置命名空间:
<pages> <namespaces> <add namespace = "MyMVC" /> <add namespace = "WebSiteCommonLib" /> <add namespace = "WebSiteModel" /> </namespaces> </pages> |
默认的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, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </httpModules> |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步