0

The following error occured while trying to connect to SQL Server 2014 in Visual Studio 2015; the instace name is same

enter image description here

Connection string used:

<add name="DefaultConnection" 
     connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirector‌​y|\aspnet-test-20170‌​805104353.mdf;Initia‌​l Catalog=aspnet-test-20170805104353;Integrated Security=True" 
     providerName="System.Data.SqlClient" />
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • **SHOW US** your conenction string! Obviously, something is wrong with your connection string.... – marc_s Aug 10 '17 at 06:28
  • If your connection string is correct please check this http://support.webecs.com/kb/a868/how-do-i-configure-sql-server-express-to-allow-remote-tcp-ip-connections-on-port-1433.aspx – Thiago Loureiro Aug 10 '17 at 07:01
  • Your connection string looks good. But have you tried [this](https://stackoverflow.com/questions/9945409/how-do-i-fix-the-error-named-pipes-provider-error-40-could-not-open-a-connec) – T. Jung Aug 10 '17 at 07:23
  • @T.Jung Sql Server services are running – syed junaid Aug 10 '17 at 08:02

0 Answers0