0

I am doing a school project on ASP .NET with database MSSQL Server. I can connect to the database (defining the connection string in the web.config), retrieve data (sqldatareader or SqlDataAdapter/DataSet). I developed the code in a VM (the database is on the VM too). Now if I try to run the program in another computer, it wont work because it is not being connected to the database. How can I have the website run even on other computers? PS: Sorry for the stupid question...but I really can't think of how to do it.

coffeeak
  • 2,980
  • 7
  • 44
  • 87
  • The database must be accessible from your webserver or where ever your Data access library exist. If the VM is on the same network as the computer you are running your program from, then you need to make the SQL Server accessible forr remote connections and take care of any firewall settings. – Nilesh Aug 14 '13 at 02:51
  • This might help: http://stackoverflow.com/questions/11278114/enable-remote-connections-for-sql-server-express-2012 and this tutorial for deploying an asp.net app on IIS: http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0 – kerzek Aug 14 '13 at 02:56
  • @Nilesh Thanks. I am now looking on google how to do that remote connection thing. – coffeeak Aug 14 '13 at 02:56
  • Wouldn't it be easier to deploy a VM? And call it an appliance :) – Yuriy Galanter Aug 14 '13 at 03:19
  • SQL Server Express is your (free) friend. – David Tansey Aug 14 '13 at 03:35
  • Now I am having new problem. @kerzek Following your links, I tried to enable remote connections but now I am getting Provider Error 40. I have been trying many solutions but none of them work- created new rule to allow incoming traffic from port 1433, on ssms allow remote connections. Nth works. – coffeeak Aug 14 '13 at 04:52
  • I can ping to the server IP btw – coffeeak Aug 14 '13 at 04:55

0 Answers0