2015-11-27 98 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