Click here to Skip to main content
14,447,974 members
Rate this:
Please Sign up or sign in to vote.
I have 2 cloud servers with Win Server 2008 R2 OS on both, one is having MSSQL 2005 database and other server is serving ASP.Net application. Please help me to connect both the servers. I want to access database from my ASP.Net application. Both servers are having unique public IP addresses..... Thanks in advance

additional content copied from comment below
I have a ASP.Net application which needs MSSQL 2005 database. If I put ASP application and database on same computer it works fine. But now I want to shift my database server on another computer what should I write in connection string??

2nd addition
I tried to directly write IP address of the computer on which my database is. But if do it in LAN it works fine. And if the database computer is in another network (internet) and I try to enter the IP of that computer it shows error of cannot find server.
Posted
Updated 20-Dec-13 2:47am
v4
Comments
Nelek 20-Dec-13 4:26am
   
What have you tried?[^]
If you need help, you should tell us where are you having problems. What you wrote is not a question, it is a requirement and noone is going to do your job for free.
Member 10137773 20-Dec-13 5:45am
   
I have a ASP.Net application which needs MSSQL 2005 database. If I put ASP application and database on same computer it works fine. But now I want to shift my database server on another computer what should I write in connection string??
An@nd Rajan10 20-Dec-13 6:01am
   
update your question..
Member 10137773 20-Dec-13 6:16am
   
In reference with above question....
I tried to directly write IP address of the computer on which my database is. But if do it in LAN it works fine. And if the database computer is in another network (internet) and I try to enter the IP of that computer it shows error of cannot find server.
An@nd Rajan10 20-Dec-13 6:21am
   
how to connect database via LAN i am struggling here...please help actually connection string was right, but mannaully set some properties in computer that was my mistake i think...can you help me..
Member 10137773 20-Dec-13 7:08am
   
You can just write in connection string the IP address of the computer where your database server in LAN. Connection string example.....

<add name="SQLCONNECTION" connectionstring="Data Source=192.168.1.5;Initial Catalog=TestDB;Persist Security Info=True;User ID=sa;Password=*********" providername="System.Data.SqlClient">
Member 10137773 20-Dec-13 7:09am
   
connectionString="Data Source=WIN-593UB69HKRK;Initial Catalog=testvivek;Persist Security Info=True;User ID=sa;Password=********"
Member 10137773 20-Dec-13 7:10am
   
I have a ASP.Net application which needs MSSQL 2005 database. If I put ASP application and database on same computer it works fine. But now I want to shift my database server on another computer what should I write in connection string??

I tried to directly write IP address of the computer on which my database is. But if do it in LAN it works fine. And if the database computer is in another network (internet) and I try to enter the IP of that computer it shows error of cannot find server.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Two links with information that might help you.

How to allow remote connections to SQL Server 2005 Express database[^]

Configure the Windows Firewall to Allow SQL Server Access[^]

Note that there will probably be firewalls and routers that block external access to the SQL Server. Those will have to be properly configured by the network administrators.
   
Comments
Maciej Los 20-Dec-13 8:44am
   
5ed!
Member 10137773 21-Dec-13 1:50am
   
Configured the server as given in above links. Still facing same issue. My database server is on virtual machine instance like Amazon Web Service virtual instance. It is having a IP address provided me by my cloud vendor. So please tell me now how can I access the database on this server from my laptops internet connection. I am using default instance of SQL server and firewall is also turned off.
Mike Meinz 21-Dec-13 7:36am
   
I suggest that you contact your cloud vendor to get support.

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100