国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發(fā)設計 > 正文

web.config配置文件示例

2019-11-18 16:57:11
字體:
供稿:網(wǎng)友

為了方便配置web.config文件,我寫了一個常用的web.config文件的示例,可以以此為模版根據(jù)需要修改。
創(chuàng)建web.config文件的三種快捷方法:
    1、用VS2005中的asp.net網(wǎng)站配置工具配置
    2、參考C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727(.net framework版本)/CONFIG/目錄下的machine.config 文件進行編寫
    3、以下邊這個文件作模版修改


點擊此處展開代碼
<?xml version="1.0" encoding="utf-8"?>
<!--
    注意: 除了手動編輯此文件以外,您還可以使用
    Web 管理工具來配置應用程序的設置。可以使用 Visual Studio 中的
     “網(wǎng)站”->“Asp.Net 配置”選項。
    設置和注釋的完整列表在
    machine.config.comments 中,該文件通常位于
    /Windows/Microsoft.Net/Framework/v2.x/Config 中
-->
<configuration xmlns="  <appSettings>
    <!-- Enable data caching -->
    <add key="EnableCaching" value="true"/>
  </appSettings>
  <connectionStrings>
    <add name="strConnUserDB"
         connectionString="Data Source=.;Initial Catalog=
PRofile1;Integrated Security=True"
         providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>

    <membership>
      <providers>
        <remove name="AspNetSqlMembershipProvider" />
        <add name="AspNetSqlMembershipProvider"
             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數(shù)據(jù)"
         />
      </providers>
    </membership>
    <profile enabled="true" defaultProvider="AspNetSqlProfileProvider" inherits="">
      <providers>
      <remove name="AspNetSqlProfileProvider" />
      <add name="AspNetSqlProfileProvider"
            connectionStringName="strConnUserDB"
            applicationName="/"
            type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
            description="存儲Profile數(shù)據(jù)"
         />
      </providers>
       <properties>
        <add name="Name"/>
        <add name="BackColor" type="System.Drawing.Color" allowAnonymous="true" serializeAs="Binary"/>
      </properties>
    </profile>
   
    <roleManager enabled="true" cacheRolesInCookie="true">
      <providers>
        <remove name="AspNetSqlRoleProvider" />
        <add name="AspNetSqlRoleProvider"
        connectionStringName="strConnUserDB"
        applicationName="/"
        type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        description="存儲Role數(shù)據(jù)"
          />
      </providers>
    </roleManager>
    <!-- Other roleManager attributes (and their defaults) include:
            cookieName=".ASPXROLES"       
            cookieTimeout="30"
            cookiePath="/"       
            cookieRequireSSL="false"       
            cookieSlidingExpiration="true"  // Renew expiring cookies?
            createPersistentCookie="false"  // Issue persistent cookie?
            cookieProtection="All" />          // Cookie protection level
     -->
    <compilation debug="false" />
    <authentication mode="Forms" />
    <!--
        <anonymousIdentification
            enabled="true"
            cookieName=".ASPXANONYMOUS"
            cookieTimeout="43200"
            cookiePath="/"
            cookieRequireSSL="false"
            cookieSlidingExpiration="true"
            cookieProtection="All"
            cookieless="UseCookies"
         />
     -->   
    <!--
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="Noaccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
     -->
  </system.web>
  <location path="user">
    <system.web>
      <authorization>
        <allow roles="?" />
        <deny users="*"/>
      </authorization>
    </system.web>
  </location>
</configuration>
http://m.survivalescaperooms.com/andymore/archive/2006/10/03/520759.html


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 达孜县| 彭山县| 策勒县| 北安市| 菏泽市| 云霄县| 延吉市| 板桥市| 秦安县| 尖扎县| 峨边| 苏尼特左旗| 东宁县| 合川市| 汶上县| 普安县| 扶余县| 永康市| 龙口市| 隆昌县| 瑞安市| 钟山县| 泗水县| 高雄市| 定日县| 高碑店市| 南昌县| 宁陵县| 阳朔县| 城口县| 普格县| 大石桥市| 尉氏县| 绥德县| 通道| 广元市| 三穗县| 综艺| 南通市| 新蔡县| 阿勒泰市|