Bartosz
Bartosz

Reputation: 4786

Connecting to SQL Azure database from client applications

I have a bunch of small desktop applications for which I have a simple database for keeping user data (who uses which app and in which version) etc.

I want the apps to connect to Azure SQL server and update database record when they're started. My apps have the ADO.NET connection string hardcoded in them. It works fine from my home network and my company guest network - however, the corporate network has got some of the ports disabled, and that apparently includes port 1433. As per Microsoft troubleshooting guide, I tried telnet and failed.

C:\Users\xxx>telnet 65.55.74.144 1433 Connecting To 65.55.74.144...Could not open connection to the host, on port 143 : Connect failed

I cannot connect neither via my applications, nor by SQL Server explorer in Visual Studio. So, the question is - how can I get around this problem? It is highly doubtful that corporate IT will unlock a port just because I ask, besides I want to keep it as simple, low profile and independent as possible. Or maybe my approach is incorrect from the very beginning and I should do stuff differently?

Cheers Bartek

Upvotes: 0

Views: 569

Answers (1)

Remus Rusanu
Remus Rusanu

Reputation: 294407

You can't.

Make your desktop applications talk to web services instead, over HTTP/HTTPS. Among other things this will also allow a more controlled access (right now anyone can connect to your database and modify the data, since your access credentials are publicly shared with your app).

A side effect of using we services is that 80/443 are almost always opened in all corp firewalls.

Upvotes: 2

Related Questions