0

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.

enter image description here

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156
  • Did you specifically rename your instance to `MSSQLSERVER2019` when installing it? Because the default instance name is just `MSSQLSERVER`. – AlwaysLearning Jul 15 '22 at 11:42
  • You need to go through all possible debugging steps: Can you ping the server? Are SQL Server and SQL Browser services started? Is the port that the instance is on open by the firewall? Is the SQL Browser port open? – Charlieface Jul 15 '22 at 11:42

0 Answers0