使用Web应用程序的Web.Config错误

时间:2010-09-06 16:29:50

标签: asp.net roleprovider

我使用这个Web.Config文件。 如果我将网站管理工具用作“网站”,那么一切都很好。

如果我使用与“Web应用程序”相同的脚本,则会收到“安全性”选项卡中的错误。 错误:

“您选择的数据存储存在问题。这可能是由无效的服务器名称或凭据或权限不足引起的。也可能是由于未启用角色管理器功能造成的。单击下面的按钮被重定向到您可以选择新数据存储的页面。

以下消息可能有助于诊断问题:无法开始监视对“Z:\ MSDOS_DOCUMENTS_SETTINGS \ SWN-Working \ Projects-Cms \ Cms-Application-ProtoTypes \ Admin-RolesPermissions \ ProtoType-Rules \ ProtoType-Rules”的更改”。 “

我真的不知道我做错了什么。你能告诉我一下吗?感谢您的支持!

<?xml version="1.0"?>

    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->

    <configuration>
        <connectionStrings>
            <add name="CmsConnectionString"
                 connectionString="Data Source=.;Initial Catalog=DbCmsWebsiteTest;Integrated Security=SSPI" />
        </connectionStrings>

        <system.web>
            <compilation debug="true" targetFramework="4.0"/>

            <roleManager enabled="true" cacheRolesInCookie="true">
                <providers>
                    <clear/>
                    <add name="AspNetSqlRoleProvider"
                         connectionStringName="CmsConnectionString"
                         applicationName="/"
                         type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
                </providers>
            </roleManager>

            <membership>
                <providers>
                    <clear/>
                    <add name="AspNetSqlMembershipProvider"
                         connectionStringName="CmsConnectionString"
                         applicationName="/"
                         type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                         enablePasswordRetrieval="false"
                         enablePasswordReset="true"
                         requiresQuestionAndAnswer="true"
                         requiresUniqueEmail="false"
                         passwordFormat="Hashed"
                         maxInvalidPasswordAttempts="5"
                         minRequiredPasswordLength="7"
                         minRequiredNonalphanumericCharacters="1"
                         passwordAttemptWindow="10"
                         passwordStrengthRegularExpression=""/>
                </providers>
            </membership>

        </system.web>
    </configuration>

1 个答案:

答案 0 :(得分:0)

我找到了解决问题的方法。 解决方案就在这里 http://support.microsoft.com/kb/317955

相关问题