0

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

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Great, thank you very much - I had a feeling that the connection string is not a secure thing to hardcode:) Can you please point me to any resource that describes the approach you talk about? (Microsoft Azure guides I found show the approach I took)
Is not easy, we're talking about a complete app rewrite. This should get you started: Creating an OData API for StackOverflow including XML and JSON in 30 minutes
Hm, not sure I understand it properly - so, the direct connection is not only not best from security point of view, but also will often not work when port 1433 is blocked (and it is often blocked)?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.