- <?xml version="1.0"?>
- <configuration>
- <configSections>
- <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
- </configSections>
- <!--URLRewriter重写规则-->
- <RewriterConfig>
- <Rules>
- <RewriterRule>
- <LookFor>~/(\d+).aspx</LookFor>
- <SendTo>~/Default.aspx?page=$1</SendTo>
- </RewriterRule>
- </Rules>
- </RewriterConfig>
- <!--System.Configuration.ConfigurationSettings.AppSettings["SocutDataLink"];-->
- <!--传说中以前.net1.1用这个保存数据库链接,如今可以用这个来保存一些配置-->
- <appSettings>
- <add key="SocutDataLink" value="Data/db1.mdb"/>
- <add key="Domain" value="http://www.yongfa365.com/"/>
- <add key="Author" value="柳永法,yongfa365"/>
- </appSettings>
- <!--System.ConfigurationConfigurationManager.ConnectionStrings["SqlConnection"].ProviderName;-->
- <!--System.ConfigurationConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString;-->
- <!--.net2.0用这个保存数据库链接-->
- <connectionStrings>
- <add name="SqlConnection" connectionString="Data Source=.\SQL2005;Initial Catalog=MSSQLDB;Integrated Security=True" providerName="System.Data.SqlClient"/>
- <add name="SqlConnection2" connectionString="Data Source=.\SQL2005;Initial Catalog=MSSQLDB;Persist Security Info=True;User ID=usr;Password=pwd" providerName="System.Data.SqlClient"/>
- <add name="AccessConnection" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source = D:\Data\mydb.mdb;" providerName="System.Data.OleDb"/>
- <!--<remove name="LocalSqlServer"/>
- <add name="LocalSqlServer" connectionString="Data Source=YONGFA365\SQL2005;Initial Catalog=管理员;Integrated Security=True" providerName="System.Data.SqlClient"/>-->
- </connectionStrings>
- <system.web>
- <!--调试否,设计设为时true,发布后设为false-->
- <compilation debug="false"/>
- <!--错误显示-->
- <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
- <error statusCode="403" redirect="NoAccess.htm"/>
- <error statusCode="404" redirect="FileNotFound.htm"/>
- <error statusCode="500" redirect="InternalError.htm"/>
- </customErrors>
- <httpModules>
- <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
- </httpModules>
- <!--
- <httpHandlers>
- <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
- <add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
- </httpHandlers>
- -->
- </system.web>
- <!--■■■■■■■■■■■■■■■■■■■用户、角色配置 start■■■■■■■■■■■■■■■■■■■-->
- <system.web>
- <!--验证模式 mode="[Windows|Forms|Passport|None],一般用Forms"-->
- <authentication mode="Forms">
- <forms loginUrl="login.aspx" name=".CommunityServer"/>
- </authentication>
- <!--为了兼容其它数据库的Provider写的,用的还都是默认的Provider-->
- <membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="20">
- <providers>
- <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SqlConnection" applicationName="LivePortal" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"/>
- </providers>
- </membership>
- <profile defaultProvider="SqlProfileProvider">
- <providers>
- <add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="SqlConnection"/>
- </providers>
- </profile>
- <roleManager defaultProvider="SqlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All">
- <providers>
- <clear/>
- <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="SqlConnection" applicationName="LivePortal"/>
- </providers>
- </roleManager>
- </system.web>
- <!--用户,角色 权限[roles|users]="一个逗号分隔的角色或用户列表"-->
- <location path="admin">
- <system.web>
- <authorization>
- <allow roles="管理员,二级管理员,三级管理员"/>
- <deny users="*"/>
- </authorization>
- </system.web>
- </location>
- <location path="ChangePassword.aspx">
- <system.web>
- <authorization>
- <allow users="登录用户,管理员"/>
- <deny users="?"/>
- </authorization>
- </system.web>
- </location>
- <!--配置发送邮件的SMTP信息,为找回密码用-->
- <system.net>
- <mailSettings>
- <smtp from="yongfa365@qq.com">
- <network host="smtp.qq.com" password="64049027" port="25" userName="yongfa365"/>
- </smtp>
- </mailSettings>
- </system.net>
- <!--■■■■■■■■■■■■■■■■■■■用户、角色配置 end■■■■■■■■■■■■■■■■■■■-->
- </configuration>
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<!--URLRewriter重写规则-->
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d+).aspx</LookFor>
<SendTo>~/Default.aspx?page=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<!--System.Configuration.ConfigurationSettings.AppSettings["SocutDataLink"];-->
<!--传说中以前.net1.1用这个保存数据库链接,如今可以用这个来保存一些配置-->
<appSettings>
<add key="SocutDataLink" value="Data/db1.mdb"/>
<add key="Domain" value="http://www.yongfa365.com/"/>
<add key="Author" value="柳永法,yongfa365"/>
</appSettings>
<!--System.ConfigurationConfigurationManager.ConnectionStrings["SqlConnection"].ProviderName;-->
<!--System.ConfigurationConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString;-->
<!--.net2.0用这个保存数据库链接-->
<connectionStrings>
<add name="SqlConnection" connectionString="Data Source=.\SQL2005;Initial Catalog=MSSQLDB;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="SqlConnection2" connectionString="Data Source=.\SQL2005;Initial Catalog=MSSQLDB;Persist Security Info=True;User ID=usr;Password=pwd" providerName="System.Data.SqlClient"/>
<add name="AccessConnection" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source = D:\Data\mydb.mdb;" providerName="System.Data.OleDb"/>
<!--<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=YONGFA365\SQL2005;Initial Catalog=管理员;Integrated Security=True" providerName="System.Data.SqlClient"/>-->
</connectionStrings>
<system.web>
<!--调试否,设计设为时true,发布后设为false-->
<compilation debug="false"/>
<!--错误显示-->
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
<!--
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
-->
</system.web>
<!--■■■■■■■■■■■■■■■■■■■用户、角色配置 start■■■■■■■■■■■■■■■■■■■-->
<system.web>
<!--验证模式 mode="[Windows|Forms|Passport|None],一般用Forms"-->
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".CommunityServer"/>
</authentication>
<!--为了兼容其它数据库的Provider写的,用的还都是默认的Provider-->
<membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="20">
<providers>
<add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SqlConnection" applicationName="LivePortal" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"/>
</providers>
</membership>
<profile defaultProvider="SqlProfileProvider">
<providers>
<add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="SqlConnection"/>
</providers>
</profile>
<roleManager defaultProvider="SqlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All">
<providers>
<clear/>
<add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="SqlConnection" applicationName="LivePortal"/>
</providers>
</roleManager>
</system.web>
<!--用户,角色 权限[roles|users]="一个逗号分隔的角色或用户列表"-->
<location path="admin">
<system.web>
<authorization>
<allow roles="管理员,二级管理员,三级管理员"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
<location path="ChangePassword.aspx">
<system.web>
<authorization>
<allow users="登录用户,管理员"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
<!--配置发送邮件的SMTP信息,为找回密码用-->
<system.net>
<mailSettings>
<smtp from="yongfa365@qq.com">
<network host="smtp.qq.com" password="64049027" port="25" userName="yongfa365"/>
</smtp>
</mailSettings>
</system.net>
<!--■■■■■■■■■■■■■■■■■■■用户、角色配置 end■■■■■■■■■■■■■■■■■■■-->
</configuration>
<!--■■■■■■■■■■■■■■参考配置,使用时自己调整,无法直接使用■■■■■■■■■■■■-->
<?xml version="1.0"?>
<configuration>
<!--■■■■■■■■■■■■■■■■■■■伪静态配置 start■■■■■■■■■■■■■■■■■■■-->
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<!--URLRewriter重写规则-->
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d+).aspx</LookFor>
<SendTo>~/Default.aspx?page=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
<!--
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
-->
</system.web>
<!--■■■■■■■■■■■■■■■■■■■伪静态配置 end■■■■■■■■■■■■■■■■■■■-->
<!--System.Configuration.ConfigurationSettings.AppSettings["SocutDataLink"];-->
<!--传说中以前.net1.1用这个保存数据库链接,如今可以用这个来保存一些配置-->
<appSettings>
<add key="SocutDataLink" value="Data/db1.mdb"/>
<add key="Domain" value="http://www.yongfa365.com/"/>
<add key="Author" value="柳永法,yongfa365"/>
</appSettings>
<!--System.ConfigurationConfigurationManager.ConnectionStrings["SqlConnection"].ProviderName;-->
<!--System.ConfigurationConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString;-->
<!--.net2.0用这个保存数据库链接-->
<connectionStrings>
<add name="SqlConnection" connectionString="Data Source=.\SQL2005;Initial Catalog=liveportal;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="SqlConnection2" connectionString="Data Source=.\SQL2005;Initial Catalog=MSSQLDB;Persist Security Info=True;User ID=usr;Password=pwd" providerName="System.Data.SqlClient"/>
<add name="AccessConnection" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source = D:\Data\mydb.mdb;" providerName="System.Data.OleDb"/>
<!--<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=YONGFA365\SQL2005;Initial Catalog=管理员;Integrated Security=True" providerName="System.Data.SqlClient"/>-->
</connectionStrings>
<system.web>
<!--调试否,设计设为时true,发布后设为false-->
<compilation debug="false"/>
<!--错误显示-->
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
</system.web>
<!--■■■■■■■■■■■■■■■■■■■用户、角色配置 start■■■■■■■■■■■■■■■■■■■-->
<system.web>
<!--验证模式 mode="[Windows|Forms|Passport|None],一般用Forms"-->
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".CommunityServer"/>
</authentication>
<!--为了兼容其它数据库的Provider写的,用的还都是默认的Provider-->
<membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="20">
<providers>
<add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SqlConnection" applicationName="LivePortal" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"/>
</providers>
</membership>
<profile defaultProvider="SqlProfileProvider">
<providers>
<add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="SqlConnection"/>
</providers>
</profile>
<roleManager defaultProvider="SqlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All">
<providers>
<clear/>
<add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="SqlConnection" applicationName="LivePortal"/>
</providers>
</roleManager>
</system.web>
<!--用户,角色 权限[roles|users]="一个逗号分隔的角色或用户列表"-->
<location path="admin">
<system.web>
<authorization>
<allow roles="管理员,二级管理员,三级管理员"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
<location path="ChangePassword.aspx">
<system.web>
<authorization>
<allow users="登录用户,管理员"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
<!--配置发送邮件的SMTP信息,为找回密码用-->
<system.net>
<mailSettings>
<smtp from="yongfa365@qq.com">
<network host="smtp.qq.com" password="64049027" port="25" userName="yongfa365"/>
</smtp>
</mailSettings>
</system.net>
<!--■■■■■■■■■■■■■■■■■■■用户、角色配置 end■■■■■■■■■■■■■■■■■■■-->
</configuration>