I have freshly installed SQL Server 2019 and created a named instance: MSSQLSERVER2019
.
Here is my connection string in my web.config
- Specifically renamed the instance to MSSQLSERVER2019
.
Getting the following 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. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Web.config
:
<add name="Default"
connectionString="Server=DESKTOP-05P515O\MSSQLSERVER2019;Database=test-clnc;User Id=user-id;Password=password;MultipleActiveResultSets=True"
providerName="System.Data.SqlClient"/>
<add name="Index"
connectionString="Server=DESKTOP-05P515O\MSSQLSERVER2019;Database=index;User Id=user-id;Password=user-id;MultipleActiveResultSets=True"
providerName="System.Data.SqlClient"/>
SQL Server Browser service is not running and unable to start as it throw access denied error.