Azure SQL – Resolving error – “Cannot open server ‘server name’ requested by the login. Client with IP address ‘ ‘ is not allowed to access the server. “

Hi All,
Greetings for the day 🙂 LIFE IS BEAUTIFUL 🙂 I hope we all are safe 🙂 STAY SAFE, STAY HEALTHY 🙂
Today new issue and solution 🙂
Background:
- I have created database in Azure SQL
- Following are my database details
- I am trying to connect my Azure SQL database using SSMS (SQL Server management studio)
- While connecting I am getting the error
- This error comes multiple time – even when I am connecting from my .NET Core application / Azure WebJob
Error / Issue:

When I was trying to connecting from my .NET Core console application / Azure WebJob, same kind of error I was getting as
Cannot open server ‘knowledge-junction’ 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.
Same error while connecting to “Query Editor” from Azure portal as

Solution : To solve this issue we need to update firewall rule from the firewall settings from Azure Portal.
- Go to Azure Portal
- Open you SQL database
- There is option in top navigation – “Set server firewall“

- Click on “Set server firewall” link
- We will be redirected to “Firewall settings” as
- Add new firewall rule for allowing IP address as shown in above figure
- Once firewall rule is added successfully we are ready to connect and it worked for me 🙂
Thanks for reading 🙂 If its worth at least reading once, kindly please like and share. SHARING IS CARING 🙂
Share In Teams:Enjoy the beautiful life 🙂 Have a FUN 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂
You must be logged in to post a comment.