We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Connecting to SQL Server from behind proxy with VB.NET

Medium Priority
842 Views
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!
Comment
Watch Question

Dirk HaestProject manager
CERTIFIED EXPERT

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

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

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

Author

Commented:
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

Commented:
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.
Project manager
CERTIFIED EXPERT
Commented:
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
http://www.sql-server-performance.com/articles/dba/Configure_Windows_Firewall_for_SQL_Server_Remote_Connections_p1.aspx

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
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
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.