开发者

ASP.NET Web Application Administration Security section: Unable to connect to SQL Server DB

开发者 https://www.devze.com 2023-03-13 01:27 出处:网络
I am using SQL Server Web (Full version not SQLExpress). I can connect to the database fine from my VS2010. However when I go to ASP.NET Web Application Administration, click \"Security\" I got below

I am using SQL Server Web (Full version not SQLExpress). I can connect to the database fine from my VS2010. However when I go to ASP.NET Web Application Administration, click "Security" I got below error:

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开发者_StackOverflow中文版 help in diagnosing the problem: Unable to connect to SQL Server database. "

I know I miss something. Can somebody help?

Thanks


Just a tip, have a look in your web.config file and set YOURMACHINENAME in the data source

<connectionStrings>
   <remove name="LocalSqlServer" />
   <add name="LocalSqlServer" connectionString="Integrated Security=SSPI;Data Source=YOURMACHINENAME ;Initial Catalog=aspnetdb;" providerName="System.Data.SqlClient" />
</connectionStrings>

Hope it help

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号