2013-06-20 80 views
1

我想連接到一個活的SQL Server數據庫,而不是本地登錄身份驗證。以下是web.config我的設置:無法識別的配置節連接字符串。試圖連接到SQL Server

<connectionstrings> 
    <add name="scrumDbConnectionString" 
     connectionstring="Data Source=SERVERNAME;Initial Catalog=DATABASENAME; 
          User ID=MYUSERNAME;Password=MYPASSWORD" 
     providername="System.Data.SqlClient" /> 
</connectionstrings> 

當我在網站管理工具,當我去到安全的網頁我得到以下錯誤:

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: Unrecognized configuration section connectionstrings. (C:\Documents and Settings\tunnelld\My Documents\Visual Studio 2010\WebSites\ZSRBlank\web.config line 10)

但是,當我檢查數據庫連接它說它很好。幫幫我!

+0

http://social.msdn.microsoft.com/Forums/vstudio/en-US/f3df53fe-666b- 4a98-92d2-d6e4ba52552a /無法識別的配置部分連接字符串 – marceljg

+0

我只是試圖將目標框架從4.0設置爲2.0,並導致相同的錯誤。 –

回答

1

嘗試使ConnectionString中的一行,我想換行/空間扔它關閉

+0

我得到了同樣的錯誤。 –

+0

你試過這樣嗎? http://www.connectionstrings.com/Articles/Show/store-connection-string-in-web-config – Dustin

+0

我試圖複製和粘貼你有什麼和更改憑據,它連接再次到本地數據庫。 –