web.config样式
<?xml version="1.0"?>
<configuration >
<connectionStrings>
<add name="ConnectionString" connectionString="server=(local)"SQLexpress;database=databaseName;uid=sa;pwd=password" providerName="System.Data.SqlClient""/>
</connectionStrings>
<appSettings>
<add key="FCKeditor:BasePath" value="~/fckeditor/"/>
<add key="FCKeditor:UserFilesPath" value="~/UploadFiles/"/>
</appSettings>
<location path="CatalogAdmin.aspx"><!--对此页面访问权限设置-->
<system.web>
<authorization>
<allow roles="Administrators"/>
<deny users="*"/><!--*表示所有用户,?表示匿名用户-->
</authorization>
</system.web>
</location>
<system.web>
<httpRuntime maxRequestLength="40960" executionTimeout="600"/>
<compilation debug="true"/><!-- 因此只在开发过程中将此值 设置为 true。 -->
<roleManager enabled="true" /><!--开启角色管理-->
<authentication mode="Forms">
<forms name="WebSize" loginUrl="Login.aspx" path="/" protection="All" timeout="60"/><!--未登录的用户转到Login.aspx,coolkie过期时间60分钟,开启保护-->
</authentication>
<customErrors mode="On" defaultRedirect="~/Error.htm">
<error statusCode="404" redirect="~/Error.htm"/>
</customErrors>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<pages theme="WebDefault" validateRequest="false"/><!--指定web默认样式,允许html代码-->
</system.web>
</configuration>
<configuration >
<connectionStrings>
<add name="ConnectionString" connectionString="server=(local)"SQLexpress;database=databaseName;uid=sa;pwd=password" providerName="System.Data.SqlClient""/>
</connectionStrings>
<appSettings>
<add key="FCKeditor:BasePath" value="~/fckeditor/"/>
<add key="FCKeditor:UserFilesPath" value="~/UploadFiles/"/>
</appSettings>
<location path="CatalogAdmin.aspx"><!--对此页面访问权限设置-->
<system.web>
<authorization>
<allow roles="Administrators"/>
<deny users="*"/><!--*表示所有用户,?表示匿名用户-->
</authorization>
</system.web>
</location>
<system.web>
<httpRuntime maxRequestLength="40960" executionTimeout="600"/>
<compilation debug="true"/><!-- 因此只在开发过程中将此值 设置为 true。 -->
<roleManager enabled="true" /><!--开启角色管理-->
<authentication mode="Forms">
<forms name="WebSize" loginUrl="Login.aspx" path="/" protection="All" timeout="60"/><!--未登录的用户转到Login.aspx,coolkie过期时间60分钟,开启保护-->
</authentication>
<customErrors mode="On" defaultRedirect="~/Error.htm">
<error statusCode="404" redirect="~/Error.htm"/>
</customErrors>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<pages theme="WebDefault" validateRequest="false"/><!--指定web默认样式,允许html代码-->
</system.web>
</configuration>