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>

 

你可能感兴趣的:(config)