skip to Main Content

My app is running locally without any issue but when I try to run it from Azure console I have the following error :

An error occurred while starting the application.
SqlException: Cannot open server ‘Server-name’ requested by the login. Client with IP address ‘w.x.y.z’ 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.
Microsoft.Data.ProviderBase.DbConnectionPool.CheckPoolBlockingPeriod(Exception e)

SqlException: Cannot open server ‘server-name’ requested by the login. Client with IP address ‘ip’ is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule

I have added IP in firewall setting on azure portal still the issue is happening

3

Answers


  1. You have to update the settings of the "Firewalls and virtual networks" of your SQL Server.

    Browse to your SQL Server, add the IP address and allow other azure services and resources to access the server. Refresh and wait at least 5 minutes before trying again.

    I also had my ubuntu server firewall blocking my request once, so be sure your webserver is not responsible.

    Login or Signup to reply.
  2. This error was caused because your IP was not added in the SQL server tab(azure portal). So you must add the IP address of your SQL Server on Azure portal

    Login or Signup to reply.
  3. Have you tried enabling this setting?enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search