Click here to Skip to main content
14,121,023 members
Rate this:
Please Sign up or sign in to vote.
See more: , +
The company wanted to use C# windows application for daily monitoring activities. I have developed the same. We have installed the sql server on their database server.
But users are all around the states and they wanted to install the application on their laptop or machine which is fine. But the thing is How can the application access the company private database server over the internet? It is against of company policy to expose the private and personal database over the internet. Firewall is also installed on their server.
Company wanted some other type of network for the application and database. Please help me out.

What I have tried:

I have installed the sql server on their server and also installed the application on my laptop but it is not accessible to my application whereas I tried the same on LAN it is working fine.
Updated 16-Jul-18 17:58pm
F-ES Sitecore 17-Jul-18 4:43am
You can either, as suggested, use a VPN, or if that's not an option the other solution is to completely rewrite how your application works by using webservices over https (or similar) rather than a direct connection to the database. Depending on how sensitive this data is you might want to look at encrypting it before sending it to the services if you don't want to rely on https alone.
TAUSEEF KALDANE 18-Jul-18 23:22pm
But web service should be hosted publicly to access the same.

1 solution

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

Solution 1

Have you tried VPN (Virtual Private Network)? I like OpenVPN myself. Uses two-factor authentication with self-signed certificates. So each user has to have an username, a password, and a digital certificate to access the VPN. After that, it is as seamless as being on the on-premises LAN.
TAUSEEF KALDANE 18-Jul-18 23:24pm
Friend, I don't have idea about openvpn?? What are pros and cos?? And how do we use that??
fatman45 18-Jul-18 23:50pm
VPN is a secure tunnel over the internet to your private network. Using OpenVPN, you setup a VPN server on the private network. Using the server, you create a login, password, and self-signed SSL certificate for each remote user. The remote users install the OpenVPN client on their machine. When they want to connect, they run the client, enter their username and password, and the OpenVPN server issues them an IP address that is on your private network. The VPN "tunnel", as it is called, is secured by the SSL certificates. The OpenVPN server also "pushes", or forwards, the private network's DNS to the client. So they can access the database by it's regular name. By the way OpenVPN is already installed on some routers, so your private network may already have it. And if it doesn't have it, for many routers it is available as a package you can download and install on the router. You can read more about generic VPN here: and OpenVPN in the link I already gave you - just go to the downloads page, the main page is mostly talking about their cloud VPN for end users.
TAUSEEF KALDANE 19-Jul-18 22:46pm
Hi Friend, Thanks for the explanation. Do we need to change the connection code as we start working on openvpn or the existing code will work fine? For desktop application
fatman45 19-Jul-18 23:23pm
If you are using a DNS name (domain name) to connect to your SQL server then no change to your application will be necessary. VPN will act just like you are at the office LAN, and your app should connect no problem.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.190518.1 | Last Updated 17 Jul 2018
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

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