Hello,
I am trying to connect a web app to a SQL 2005 that is behind a firewall.
The challenge is this, the SQL is behind a firewall and the webserver is at a different location. From my desktop development environment, I connect through a VPN first and then can point to the internal IP of the DB server. This works fine as long as the VPN is connected.
But how do I do this from a hosted web application that is not on my local machine or using my VPN?
Is there some sort of tunneling Connection that I can use within code?
thanks
As you are going to deploy the web site to a remote location, to have SQL Connection via Tabular Data Stream would require opening up extra ports (1433 and 1434) - since the days of the Slammer worm, I doubt if any person in charge of a company network would allow these ports to be opended up to the outside world.
Can you deploy a copy of the database to the remote site? You could use SQL Express provided the database size was within 2Gb. Alternatively you write a web service, which only require Port 80 to be open through the firewall from your external host into your DMZ.
|||Thanks for the reply. The challenge is that there is a database collecting live survey data...and that DB is in a different physical location behind a firewall, etc.
The application I am writting is on a different server/ different building, etc. The DB server has VPN access to it but I don't know how to include that in my code so that my app can talk to it and pull the live data.
(and you are correct, just opening those ports would be dangerous.)
|||In which case you need to have the database both on the remote server on within your LAN. As it is a survey database, would i be correct to asume that data is only every inserted (unlil a survey is deleted en-mass)?
In which case include a web service on your remote server, set only to respond to the IP address of your LAN. Depending on the senitivity of your data you may elect to run HTTPS for the web service.
The key point is identifying batches of records to copy. Without knowing your database, I cannot comment of the best means of setting up the database to do this. If only inserting as I have suggested that you need a method that will return a manageable block of records. This method will be called by a Windows Service on a machine within your LAN which will then call a "make it so" stored procedure on your local database.
The required ports will be already open from your LAN out and into your remote IIS server.
No comments:
Post a Comment