Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

connection string remote sql database not working

$
0
0

Hi there,

We're trying to connect with our database in our server, but we're doing something wrong. The connection with the local database works fine, but when we edit the connection string with this:

"DatabaseConnection": "Server=85.000.000.000\\SQLEXPRESS;Database=DDATABASENAME;Trusted_Connection=False;MultipleActiveResultSets=true;User ID=sa;Password=PASSWORD;"

it won't connect and we're getting this error:

SqlException: 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: 26 - Error Locating Server/Instance Specified)

Our server allow external connections and we tried connect to the database by adding a connection in SQL Server Object Explorer and that works. Does someone see what is wrong about this? 

P.S. it's a clean authentication template from asp.net core and we're using appsettings.json for things like our connectionstring


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>