2014-01-24 21 views
2

即使this page在標籤中顯示屬性右側,當我嘗試對其進行編碼時,我在該行下面看到可怕的藍色波浪曲線,並且懸停消息爲我提出了這個問題的標題。爲了激活此功能,我需要做些什麼,因爲微軟的頁面清楚地顯示了這樣做。VS2012對ConnectionStrings部分表示「configProtectionProvider屬性不被允許」

謝謝, 彼得

+1

http://forums.asp.net/t/1771774.aspx –

+0

我刪除了屬性,使用Aspnet_regiis.exe進行了加密,並將其添加回來,並且一切似乎都正常,即使VS仍然抱怨屬性。 –

回答

1

我覺得configProtectionProvider屬性只支持.NET 2.0

反正你可以通過添加

的xmlns =「http://schemas.microsoft.com/使用它。 NetConfiguration/2.0" 到您的配置節點

像這樣:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> 
    <connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider"> 
    <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"