Windows Azure Open Server Request Client with IP address 'XXX.XXX.XXX.XX' is not allowed to access the server


I use Azure to deploy my database. I'm having trouble using the Azure platform and don't know how to fix it. When my backend code tries to connect to db, I get the same error like that

"2021-01-01T18:27:13.198490+00:00 app[web.1]: fail: Microsoft.EntityFrameworkCore.Database.Connection[20004] 2021-01-01T18:27:13.198500+00:00 app[web.1]: An error occurred using the connection to database 'DB_NAME' on server ',1433'.

2021-01-01T18:27:13.206639+00:00 app[web.1]: fail: Microsoft.EntityFrameworkCore.Query[10100]

2021-01-01T18:27:13.206642+00:00 app[web.1]: An exception occurred while iterating over the results of a query for context type 'BackendService.Context.ApplicationDbContext'.

2021-01-01T18:27:13.206706+00:00 app[web.1]: Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open server 'SERVER_NAME' requested by the login. Client with IP address '' is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.

When I enter this IP address into my db's firewall on the AZURE platform, the error goes away, but I have to enter a new IP address several times a day. How can I solve this problem, please help !

asked on Stack Overflow Dec 31, 2020 by Abdullah • edited Jan 1, 2021 by Connell.O'Donnell

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0