-1

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Specified LocalDB instance name is invalid.

I have searched couple of times; but could not solve this problem.

enter image description here

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
s_a_h_a
  • 1
  • 3
  • *Kindly solve this* - ***no!*** we might *help you* solve this - but we're not just here to fix all your problems. ***YOU*** have to do the most work - and learn something from it, too! Step 1: this is obviously a connection problem to a SQL Server database - then please **show us** the connection string you're using in your application – marc_s Feb 03 '18 at 18:26
  • **Please don't start learning how to use databases with ASP.NET by building authentication logic. Your SQL statement to authenticate users is a security nightmare waiting to happen.** – jessehouwing Feb 03 '18 at 18:36
  • Yes sir, I have this connection string path ... (@"Data Source=(LocalDB)\\v11.0;AttachDbFilename= C:\\Users\\SUBHADIP-ADMIN\\Documents\\Visual Studio 2012\\WebSites\\Shopping\\App_Data\\shoppingdb.mdf Integrated Security=True") – s_a_h_a Feb 04 '18 at 00:04

1 Answers1

0

You connection string is wrong so it cannot connect to the SQL server. It is saying the localdb instance name is wrong so it cannot connect.

This thread will help you find out the localdb instances on your computer

SQL Server: How to find all localdb instance names

Ken Tucker
  • 4,126
  • 1
  • 18
  • 24