I am working on an ASP.NET MVC project, which uses this connection string:
<add name="Name"
connectionString="Data Source=.;initial catalog=MyDBName;integrated security=True;multipleactiveresultsets=True;" />```
Note: the data source value is ., this works but after I reset my pc and reinstalled SQL Server, it no longer works, I get an error
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.
until I change the . in the connection string to DESKTOP-1V12LN7\SQLEXPRESS.
My question is what does the value . in the connection string mean and why doesn't it work after reinstalling SQL Server?
.meant localhost with the default instance name. Your latest instance is named, so.on its own won't work (.\SQLEXPRESSorlocalhost\SQLEXPRESSwould though).