【问题标题】:Visual Studio 2010 Web Conf Tool ErrorVisual Studio 2010 Web Conf 工具错误
【发布时间】:2015-11-27 05:08:12
【问题描述】:

我在笔记本电脑上安装了 VS 2010 Professional,但在使用 Web 配置工具时遇到了问题。当我尝试转到“安全”选项卡时,它会显示此消息。

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. 

The following message may help in diagnosing the problem: Object reference not set to an instance of an object.

我使用ASP提供的默认数据库来处理用户授权,所以我使用的数据存储是AspNetSqlProvider。

这是 web.config 的内容:

<?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>
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>
    <authentication mode="Forms">
      <forms loginUrl="login.aspx"></forms>
    </authentication>
    <roleManager enabled="true">
      <providers/>
    </roleManager>
    <authorization>
      <deny users="?"/>
    </authorization>
  </system.web>
</configuration>

该工具在我们大学实验室的 PC 上运行良好。我真的不明白出了什么问题,因此我无法完成我的任务。我四处搜索,遇到这种问题的人通常忘记启用角色管理器,或者使用他们自己的自定义数据库。没有一个解决方案似乎适用于我目前的情况。请帮忙!谢谢!

编辑:仅供参考,数据库中已经有一个用户,我在大学实验室的 PC 上使用此工具添加了该用户。当我运行网站时,我可以很好地登录。但是访问工具中的安全选项卡时总是给我错误。

【问题讨论】:

    标签: asp.net visual-studio-2010 web-config


    【解决方案1】:

    测试一下:

    <configuration>
    <system.web>
    <compilation debug="true" targetFramework="4.0"/>
    <authentication mode="Forms">
      <forms loginUrl="login.aspx"></forms>
    </authentication>
    <roleManager enabled="true">
      <providers/>
    </roleManager>
    <authorization>
      <deny users="?"/>
    </authorization>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-05
      • 2012-03-20
      • 2012-03-19
      • 2018-11-06
      • 1970-01-01
      • 2015-06-30
      • 1970-01-01
      相关资源
      最近更新 更多