Connecting to SQL Server from behind proxy with VB.NET

Posted on 2009-02-13
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
    LVL 53

    Expert Comment

    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;


    Author Comment

    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

    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

    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

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduced in Microsoft SQL Server 2005, the Copy Database Wizard ( is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now