“Client with IP address is not allowed to access the server” when running update-database command through Visual Studio.

If you are deploying your entity framework database changes to your production database through Visual Studio(like we do) for the first time,  you might receive the following error:

Cannot open server '<ServerName>' requested by the login. 
Client with IP address '<MyIPAddress>' 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.

To fix this issue, you need to go to your database in the azure portal, click “Set server Firewall” and then add your IP address under “Add Client IP”

2019-04-30 23_10_11-SimplerProductsScrubber_db - Microsoft Azure


You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.