0

How can I input the correct connection string to the appsetting.json file?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
thccchk
  • 5
  • 4

1 Answers1

0

You should connect using your internal network IP and specify it's a tcp connection.

Let's say your IP is: 192.168.0.5 and SQL server is running on port 1433 and it's a named instance:

Server=tcp:192.168.0.5,1433\YourInstanceName;Database=YourDbName;User Id=YourUsername;Password=YourPassword;

If you don't have a named instance:

Server=tcp:192.168.0.5,1433;Database=YourDbName;User Id=YourUsername;Password=YourPassword;

Make sure to read this thread as you need to execute some steps for SQL server to be accessible.

Preben Huybrechts
  • 5,853
  • 2
  • 27
  • 63