繁体中文
设为首页
加入收藏
当前位置:.Net技术首页 >> Asp.Net开发 >> web.config配置文件示例

web.config配置文件示例

2007-10-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:为了方便配置web.config文件,我写了一个常用的web.config文件的示例,可以以此为模版根据需要修改。 创建web.config文件的三种快捷方法: 1、用VS2005中的ASP.net网站配置工具配置 2、参考C:\WINDOWS\Microsoft...

为了方便配置web.config文件,我写了一个常用的web.config文件的示例,可以以此为模版根据需要修改。

创建web.config文件的三种快捷方法:

1、用VS2005中的ASP.net网站配置工具配置

2、参考C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727(.net framework版本)\CONFIG\目录下的machine.config 文件进行编写

3、以下边这个文件作模版修改

点击此处展开代码

http://schemas.microsoft.com/.NetConfiguration/v2.0">

connectionString="Data Source=.;Initial Catalog=profile1;Integrated Security=True"

providerName="System.Data.SqlClient" />

type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

connectionStringName="strConnUserDB"

enablePasswordRetrieval="false"

enablePasswordReset="true"

requiresQuestionAndAnswer="true"

applicationName="/"

requiresUniqueEmail="false"

passwordFormat="Hashed"

maxInvalidPasswordAttempts="5"

minRequiredPasswordLength="7"

minRequiredNonalphanumericCharacters="1"

passwordAttemptWindow="10"

passwordStrengthRegularExpression=""

description="存储membership数据"

/>

connectionStringName="strConnUserDB"

applicationName="/"

type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

description="存储Profile数据"

/>

connectionStringName="strConnUserDB"

applicationName="/"

type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

description="存储Role数据"

/>

做人要厚道,请注明转自酷网动力(www.ASPCOOL.COM)。

责任编辑:admin
相关文章