How can I connect to Azure database from desktop application with non-static IP address?

fatih uyanık 100 Reputation points
2024-09-28T18:15:06.2433333+00:00

Hello, I am working on a WPF desktop application. I created an Azure SQL database as a database. However, the connection constantly fails because the IP address changes constantly with the connection sentence I set through the application. What settings do I need to make to connect to the database? Thank you.

Azure SQL Database
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,902 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 64,826 Reputation points
    2024-09-28T18:48:02.87+00:00

    I assume you mean the azure firewall is blocking. If you know the ip range of the users you can add the range. Otherwise you need to really open to any ipaddress (not a good idea).

    you may also want look at a private vpn or application gateway.

    a better design is for azure to host a webapi to the Sqlserver that the desktop app uses.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.