Click here to Skip to main content
15,898,953 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
hi experts

i want to release a c# asp.net application on internet host, but the database (sql server 2008) is in a local server because other local applications are connected to it.
the application works fine in my computer.
i think i need a valid IP for connecting to sql server from the website but i'm not sure and didn't find any instructions in google.
do you have any solution for this or some good instructions links?
thanks for helping
Posted
Updated 11-May-12 22:23pm
v3

You need to have static IP for your database server for it. Once you have that, then use something like this in connection string for datasource:
"data source = IPAddress\InstanceName,portnumber"

Look at these article:
MSDN: Connecting to SQL Server over the Internet[^]
Microsoft Technet: Configuring a DHCP server static IP address[^]


BTW, You should create a service or some sort of intermediary way to expose your database for connections, exposing the whole thing to the internet will be risky from data security propespective!
 
Share this answer
 
Comments
Maciej Los 12-May-12 5:22am    
Good answer, my 5!
Vartan Khachatourian 12-May-12 5:36am    
thank you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900