Connecting to SQL Server from behind proxy with VB.NET

Posted on 2009-02-13
Medium Priority
Last Modified: 2012-05-06
Hi Experts

I've created a winforms application using programmers, but the project is over, the programmers are gone, and I must now solve this myself - hopefully with your help.

The client application is programmed in VB.NET. It connects to SQL Server 2005, which is on a hosted server. From most customer locations, this is no problem - but two customers use proxy servers for their internet connections, and they cannot connect. I don't have access to their proxy server or proxy details.

I have seen in some internet applications, that you can specify your proxy details. In other applications, I've seen that you can choose "use Internet Explorer proxy settings". So my question is this:

Is it possible to add some smart codelines to the login form of my application, that will load the internet explorer proxysettings from my customer's computer, and use this to connect to the SQL server? Or are there perhaps other ways to solve this?`

Thanks a lot!
Question by:Tooor
  • 3
  • 2
LVL 53

Expert Comment

ID: 23631052
I think you can connect it with your connectionstring through an ip-address on a specific port

Connect via an IP address
Data Source=,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

See: http://connectionstrings.com/sql-server-2005#1

Author Comment

ID: 23631359
Thanks Dhaest. The link is very useful. I've nowed put three different connection strings in there, using Network Libraries dbmssocn, dbnmpntw and dbmsspxn, and the user can choose with three radiobuttons. I'll ask the customer to test it now.

Author Comment

ID: 23631513
It didn't work. And I'm afraid my first diagnosis of the problem perhaps wasn't correct. It seems these customers, both international consulting companies, have very strict firewalls - and that might also be the problem. One person said they almost only allow HTTP / HTTPS connections.

It wouldn't be possible to make the connection between the app and the SQL server appear "HTTP" to the firewall, or some similar solution?

Thanks again.
LVL 53

Accepted Solution

Dhaest earned 2000 total points
ID: 23631523
If a firewall doesn't allow to connect to the remote server, you won't be able to create a connection

Configure Windows Firewall for SQL Server Remote Connections

Author Closing Comment

ID: 31546481
Allright, Dhaest. I guess you're right. I'll just have to ask them to open the firewall for this connection, to install a local database, or to access the database from outside the office. Thanks

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question