温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ASP.NET网站管理工具的安全选项无法打开

发布时间:2020-05-23 16:46:34 来源:网络 阅读:600 作者:myjieli 栏目:编程语言

环境:Win7+VS2010+SQLServer 2008R2

 

ASP.NET网站管理工具的安全选项无法打开

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

<?xml version="1.0"?>
<!--
  有关如何配置 ASP.NET 应用程序的详细信息,请访问
  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网站管理工具的安全选项无法打开

 

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI