找回密码
 注册
搜索
热搜: 回贴

ASP.net:web.config配置文件示例

2009-12-13 12:40| 发布者: admin| 查看: 81| 评论: 0|原作者: 情殇

▲为了方便配置web.config文件,我......


为了方便配置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、以下边这个文件作模版修改

点击此处展开代码








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数据"
/>

















最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 21:26 , Processed in 0.207991 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部