I get this error in MVC4 azure database. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) This is my connection string: I don't know what to do. I tried to set the port to 1433 and I still get this error.
Are you sure that you have your IP address set to your firewall? What you might be seeing is that you have one IP address that has access, then when you log out, you get a different IP address that does not. Logging back in you reclaim the original IP address again.
http://stackoverflow.com/questions/13724682/azure-website-cannot-access-azure-db?rq=1 This solved it: I know this is a really old post, but I just battled with the same issue... I had the same issue and although I don't understand it, I have found that if I am currently logged in (on my site, not Azure console), I need to log out and then back in again and this database error goes away. It makes no sense to me, but it is what works for me after I deploy. I have had many times where I have deployed and everything works great (no need to logout/login). Sometimes it jumps into this mode. Not sure what is going on there. It has nothing to do with the connection strings in your web.config - they are all being transformed properly.