雅森电子:web.config配置文件示例

来源:百度文库 编辑:九乡新闻网 时间:2024/04/18 15:45:46
为了方便配置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数据"
          />
     

   

   
   
   
       
   
 

 
   
     
       
       
     

   

 


http://www.cnblogs.com/andymore/archive/2006/10/03/520759.html本文章来自www.21shipin.com  21视频教程网
web.config配置文件示例_Asp.net教程 原文链接:http://www.21shipin.com/html/83257.shtml