Link to home
Start Free TrialLog in
Avatar of Tomasz Czyz
Tomasz CzyzFlag for Norway

asked on

Make a VPN connection C#

My application needs to get some data from a database on a server that only can be accessed through VPN. I have a website that do the same but the website doesn't need VPN because it can access the database local.

I thought to set up a VPN connection using C# so i can access the database. The only other way i see that maybe is possible to set up some connection to my website and go through that to the database.

The VPN i'm using now is a Cisco VPN connection.
I need to fill in this:

Hostname: xxx
(using group authentication)
Name: xxx
Password: xxx
Confirm Password: xxx

Then i need to fill in my personal username and password.

Username: xxx
Password: xxx

Do you have examples of a C# VPN connection or some other ideas?
Avatar of ezraa
ezraa

I don't think that programmaticaly  establishing a VPN connection is what you are looking for.  (This sounds like it would be a big hole in your network security).  Also,  I don't think that there is an API or library for establishing a VPN connection to a Cisco VPN server, and you would need to automate the process using the cisco client tools which would be challenging.

I would recommend creating web services (that can be ssl encrypted if you are passing sensitive information) for your c# application to access the data it needs over the internet.

You should read up on web services and n-tier architecture for ideas on how to implement an application that accesses a database behind a firewall.  
Avatar of Tomasz Czyz

ASKER

I agree that it looks like a security hole, but that was the only option i saw. The information is not very sensitive, but i am very interested in the web services that you are talking about.

Do you have a (some) links with examples and descriptions how to make this.
ASKER CERTIFIED SOLUTION
Avatar of ezraa
ezraa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the examples.

It looks difficult, and the only thing i want is to have a connection to the database and send it some SELECT and WHERE commands. Are you sure this is the best and easiest way to do this?

Maybe i should open a new Topic about web services and databases?