Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect a C# MVC application to a remote SQL Server database

I have a SQL Server database located at http://192.168.10.3/MyDB. I have created a C# MVC application, and I need to know the steps to connect my application to the above database.

Is it only replacing the connection string in the web.config file ?

Data Source=?? ;Initial Catalog=??;Integrated Security=SSPI;
User ID=??;Password=pwd;

If so what am I to replace where I have placed the ?? sign ?

like image 480
Sharon Watinsan Avatar asked Jan 13 '23 18:01

Sharon Watinsan


1 Answers

  • DataSource = 192.168.10.3
  • Initial Catalog = MyDB
  • User ID = whatever sql login you are using to access your SQL Server
  • Password = password for the sql login above
like image 64
Malcolm O'Hare Avatar answered Jan 19 '23 00:01

Malcolm O'Hare