WebConfig 常用配置信息,转载备用
来源:互联网 发布:阿里云网站绑定域名 编辑:程序博客网 时间:2024/05/04 00:43
- <?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>
- WebConfig 常用配置信息,转载备用
- C# 读取WebConfig配置信息
- webconfig配置
- webconfig配置
- webconfig配置
- 转载备用
- 在js文件中,获取webconfig中的配置信息
- 加密webconfig的信息
- 加密webconfig的信息
- -876WebConfig常用节点
- WebConfig常用节点
- WebConfig常用配置文件
- webconfig 配置文件常用说明
- WebConfig常用配置文件说明
- WebConfig 安全配置.....
- webconfig:配置邮件服务
- WebConfig配置简要说明
- webconfig 部分配置
- Cstring 转换为LPARAM
- dolphin:Ubuntu Linux下的WII模拟器
- 把博客写起来
- Linux进程通信:管道
- ubuntu和redhat的crontab配置文件位置
- WebConfig 常用配置信息,转载备用
- java webservice 官方教程
- 标准库bitset类型
- ARM Linux Developer - rmk's GIT tree
- 强大的.NET反编译工具Reflector及插件!
- 引用 JVM内存管理总结
- exec函数族详解
- 终于可以发文章了。。。。
- URLRewriter最简单入门介绍 URLRewriter相关资源