2015-11-27 100 views
0

我在我的笔记本电脑上安装了VS 2010 Professional,并且在使用Web配置工具时遇到问题。当我尝试去“安全”选项卡时,它向我显示此消息。Visual Studio 2010 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上的罚款。我真的不明白什么是错的,因此我不能完成我的任务。我已经搜索过,这类问题的人通常会忘记启用roleManager,或者使用他们自己的自定义数据库。这个解决方案似乎没有用于我目前的情况。请帮忙!谢谢!编辑:仅供参考,数据库中已有用户,我在大学实验室的PC上使用此工具添加了该用户。当我运行网站时,我可以很好地登录。但访问工具中的安全选项卡不断给我错误。

回答

0

测试此:

<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> 

+0

这不工作对我来说... – Jackyef