Azure SQL Error

Fixing error “Cannot open server – – requested by the login. Client with IP address – – is not allowed to access the server.” in Azure deployments from Visual Studio

Reading Time: 4 minutes. This post describes how to work your way around the exception ‘Cannot open server – requested by login…’ The issue is caused by Azure’s somewhat annoying firewall logic, and might stop you from accessing your databases from your development machine. Symptoms When trying to publish a web project to Azure from Visual Studio, you suddenly get the following (or similar) error message: “Cannot open server ‘xxx.xxx.xxx.xxx’ requested by the login. Client with IP address ‘xxx.xxx.xxx.xxx’ is not allowed to access the server. To enable access, use the SQL Azure Portal or run sp_set_firewall_rule on the master database to create a firewall […]

Troubleshooting guide for Windows hosts -file

Reading Time: 4 minutes. This post describes how to fix possible issues with Windows hosts-file. I’ll first document how to find the damn file, and then go through a bunch of options on what to check and how to fix different possible issues. Opening the hosts -file First of all, hosts file location is usually: C:\Windows\System32\drivers\etc\hosts (link may or may not work depending on your security settings and browser version, but you can always copy-paste it to your text editor’s “Open”-dialog… 🙂 Editing the file requires elevated privileges for the text editor process, so you’ll need to run it as an administrator. Posts Related […]