2013-06-20 42 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

我试图复制和粘贴你有什么和更改凭据,它连接再次到本地数据库。 –