0

I recently tried to connect my ASP.NET Core app to SQL Server via connected services. Unfortunately, after many attempts, I kept getting this error message (unfortunately it is in German):

error message

Translation

Network-related or instance-specific error when connecting to SQL Server. The server was not found or is inaccessible. Check that the instance name is correct and that SQL Server allows remote connections. (provider: Named Pipes Provider, error: 40 - Connection to SQL Server could not be opened)

Charlieface
  • 52,284
  • 6
  • 19
  • 43
Ta1to
  • 1
  • 1
  • 1
  • 2
    What's your SQL Server connection string? You are trying to connect using named pipes but maybe can connect only using the network port. – ferhrosa Sep 16 '21 at 18:00
  • 1
    Does this answer your question? [Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?](https://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci) There are many possible reasons why this may happen. Please check all relevant points in that link: Remote connections allowed? TCP turned on? Is SQL Server service started? Is it a named instance, if so do you have the instance name in the connection string, is the correct port open, is SQL Browser started? Is a firewall blocking the connection? – Charlieface Sep 16 '21 at 23:33

0 Answers0