溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

ASP.NET網(wǎng)站管理工具的安全選項(xiàng)無(wú)法打開

發(fā)布時(shí)間:2020-05-23 16:46:34 來(lái)源:網(wǎng)絡(luò) 閱讀:624 作者:myjieli 欄目:編程語(yǔ)言

環(huán)境:Win7+VS2010+SQLServer 2008R2

 

ASP.NET網(wǎng)站管理工具的安全選項(xiàng)無(wú)法打開

2,在web.config里面添加以下代碼即可:

<?xml version="1.0"?>
<!--
  有關(guān)如何配置 ASP.NET 應(yīng)用程序的詳細(xì)信息,請(qǐng)?jiān)L問
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
 <system.web>
  <compilation debug="true" targetFramework="4.0"/>
        <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
            <providers>
                <clear />
                <add
                name="SqlProvider"
                type="System.Web.Security.SqlMembershipProvider"
                connectionStringName="NorthwindConnectionString"
                applicationName="northWind"
                enablePasswordRetrieval="false"
                enablePasswordReset="true"
                requiresQuestionAndAnswer="true"
                requiresUniqueEmail="true"
                passwordFormat="Hashed" />
            </providers>
        </membership>
        <roleManager defaultProvider="SqlProvider"
          enabled="true"
          cacheRolesInCookie="true"
          cookieName=".ASPROLES"
          cookieTimeout="30"
          cookiePath="/"
          cookieRequireSSL="false"
          cookieSlidingExpiration="true"
          cookieProtection="All" >
            <providers>
                <add
                name="SqlProvider"
                type="System.Web.Security.SqlRoleProvider"
                connectionStringName="NorthwindConnectionString"
                applicationName="northWind" />
            </providers>
        </roleManager>

    </system.web>
 <connectionStrings>
  <!--<add name="DSN_Northwind" connectionString="Server=.;Database=Northwind;UID=sa;pwd=12345" />-->
  <add name="NorthwindConnectionString" connectionString="Server=(local);Initial Catalog=aspnetdb;User ID=sa;Password=12345;"
             providerName="System.Data.Sqlclient"/>
 </connectionStrings>
</configuration>

3,正常之后:

ASP.NET網(wǎng)站管理工具的安全選項(xiàng)無(wú)法打開

 

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI