I need help configuring an application to connect to the database...
The web application is stored on shared hosting, and i need to connect to an organizations VPN, where the database is stored.
I have VPN server IP, username and password, also database server IP (local lan address, like 192.168.0.123), username and pass, but I have no idea how to set it all up...
Can you please point me in the right direction, provide some resources or info?
I need help configuring an application to connect to the database...
The web application is stored on shared hosting, and i need to connect to an organizations VPN, where the database is stored.
I have VPN server IP, username and password, also database server IP (local lan address, like 192.168.0.123), username and pass, but I have no idea how to set it all up...
Can you please point me in the right direction, provide some resources or info?
Thanx,
Ivan
Do you try connecting to database in localhost ? If yes, you can do that, and just replace localhost by your remote ip ! And you ensure that, in your remote host doesn't have a firewall (include windows firewall and other security firewall. If has, this
firewall has to accept connection from your ip).
You should map the VPN database port (depending on your database) to local IP address database port. Also you should make the correct connection string, so your application could connect to the correct server. Just take in mind that you should also should
enable the database port connections through your firewall / hosting provider firewall. Some
shared ASP.NET hosting providers will not allow outside connections.
I did connect to the same database hosted on another server, but I don't know what should the connection string/setup be for the VPN access, I guess it should first be connected to the VPN, and then point the application to the database server.
I tried just pointing the connection to the VPN server IP, but it failed to make the database connection. Maybe I'm doing something wrong, I'll retry with some different setups and check again.
I did connect to the same database hosted on another server, but I don't know what should the connection string/setup be for the VPN access, I guess it should first be connected to the VPN, and then point the application to the database server.
I tried just pointing the connection to the VPN server IP, but it failed to make the database connection. Maybe I'm doing something wrong, I'll retry with some different setups and check again.
Cheers,
Ivan
First, you have to check the connection between your computer and remote computer is normal (go to command line of windows, and run command ping your_remote_ip). If everything is good, you use Server explorer of Visual Studio, go to Database connections
> Create new connection > And choose type connection you want. Example, I chose Oracle
In server name: you write
ip_server:port/your_database_on_remote_host
And fill user name and password blanks. And Test connection, and wait little seconds. If everything's normal, successful message will appears.
If can't connect, you have to check remote server (firewall, server database in remote host). To ensure that server is normal, you should disable firewall. If unsuccessfully connect, you have to ensure that database sever right install. And if connection
is successful. You can use sqldatasource to locate this connection. And connection string will auto display. You just use this string. Good luck !
I can't get it to work, I can ping the server ok, but when I try to connect from server explorer the UN/Pass don't work...
I think i should somehow point it to the database server, but i can't figure how...
My connection string is like: Provider=SQLNCLI;Persist Security Info=False;Data Source=***.***.***.***;User Id=****;Password=********
The IP entered is the IP of the VPN server, while the database is located on another machine (192.168.1.14). Is there another setting I should use?
I also have username and password for the VPN, and the ones used in connection string are for database.
Thanx
Can you use other computer to connect to remote computer (where you remote database)? If can't connect, maybe problem was caused by remote computer. And just by database settings, or vpn connection( you can check, use web browser, and type ip address in
your address bar - and ensure that on your remote computer, you can run address localhost or ip of this remote computer. If you can run it in a both computer, you can trust that problem was caused by database settings.) Are you sure that database on remote
computer was successfully installed ? And Do you disable firewall, or add your connection into trusted list ?
clone
Member
8 Points
12 Posts
Database connection over VPN
Aug 09, 2009 02:11 AM|LINK
Hi,
I need help configuring an application to connect to the database...
The web application is stored on shared hosting, and i need to connect to an organizations VPN, where the database is stored.
I have VPN server IP, username and password, also database server IP (local lan address, like 192.168.0.123), username and pass, but I have no idea how to set it all up...
Can you please point me in the right direction, provide some resources or info?
Thanx,
Ivan
micheal9000
Member
94 Points
40 Posts
Re: Database connection over VPN
Aug 09, 2009 06:50 AM|LINK
Do you try connecting to database in localhost ? If yes, you can do that, and just replace localhost by your remote ip ! And you ensure that, in your remote host doesn't have a firewall (include windows firewall and other security firewall. If has, this firewall has to accept connection from your ip).
HostingASPNe...
All-Star
15882 Points
2977 Posts
Re: Database connection over VPN
Aug 09, 2009 07:30 AM|LINK
Hello,
You should map the VPN database port (depending on your database) to local IP address database port. Also you should make the correct connection string, so your application could connect to the correct server. Just take in mind that you should also should enable the database port connections through your firewall / hosting provider firewall. Some shared ASP.NET hosting providers will not allow outside connections.
Regards
Free ASP.NET Examples and source code.
clone
Member
8 Points
12 Posts
Re: Database connection over VPN
Aug 09, 2009 07:41 AM|LINK
Hi,
I did connect to the same database hosted on another server, but I don't know what should the connection string/setup be for the VPN access, I guess it should first be connected to the VPN, and then point the application to the database server.
I tried just pointing the connection to the VPN server IP, but it failed to make the database connection. Maybe I'm doing something wrong, I'll retry with some different setups and check again.
Cheers,
Ivan
micheal9000
Member
94 Points
40 Posts
Re: Database connection over VPN
Aug 09, 2009 09:58 AM|LINK
First, you have to check the connection between your computer and remote computer is normal (go to command line of windows, and run command ping your_remote_ip). If everything is good, you use Server explorer of Visual Studio, go to Database connections > Create new connection > And choose type connection you want. Example, I chose Oracle
In server name: you write ip_server:port/your_database_on_remote_host
And fill user name and password blanks. And Test connection, and wait little seconds. If everything's normal, successful message will appears.
If can't connect, you have to check remote server (firewall, server database in remote host). To ensure that server is normal, you should disable firewall. If unsuccessfully connect, you have to ensure that database sever right install. And if connection is successful. You can use sqldatasource to locate this connection. And connection string will auto display. You just use this string. Good luck !
clone
Member
8 Points
12 Posts
Re: Database connection over VPN
Aug 11, 2009 09:21 PM|LINK
Hi again,
I can't get it to work, I can ping the server ok, but when I try to connect from server explorer the UN/Pass don't work...
I think i should somehow point it to the database server, but i can't figure how...
My connection string is like: Provider=SQLNCLI;Persist Security Info=False;Data Source=***.***.***.***;User Id=****;Password=********
The IP entered is the IP of the VPN server, while the database is located on another machine (192.168.1.14). Is there another setting I should use?
I also have username and password for the VPN, and the ones used in connection string are for database.
Thanx
micheal9000
Member
94 Points
40 Posts
Re: Database connection over VPN
Aug 12, 2009 04:40 AM|LINK
Can you use other computer to connect to remote computer (where you remote database)? If can't connect, maybe problem was caused by remote computer. And just by database settings, or vpn connection( you can check, use web browser, and type ip address in your address bar - and ensure that on your remote computer, you can run address localhost or ip of this remote computer. If you can run it in a both computer, you can trust that problem was caused by database settings.) Are you sure that database on remote computer was successfully installed ? And Do you disable firewall, or add your connection into trusted list ?