1

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 enter code herein diagnosing the problem: Unable to connect to SQL Server database. here my connection string in web.config

<connectionStrings>
    <add name="MusicStoreEntities" connectionString="Data Source=.;Initial Catalog=MusicStore;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
user476896
  • 11
  • 1

2 Answers2

1

user localhost like 127.0.0.1 it's should be work

<connectionStrings>
    <add name="MusicStoreEntities" connectionString="Data Source=127.0.0.1;Initial Catalog=MusicStore;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
Nimesh Gami
  • 361
  • 1
  • 2
  • 18
0

set Data Source= your computer name instead of .

EAnders
  • 112
  • 8
  • i am not sure that is the problem but i'll try. – user476896 Aug 14 '15 at 11:31
  • Unfortunately, if setting it to localhost or 127.0.0.1 didn't work, this won't either. They're equivalent. Can you connect to the server itself, just not the database? – EAnders Aug 14 '15 at 15:42