question

estera avatar image
estera asked

Mvc azure database error

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.
azuresql-azure.net-framework
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

This site runs off of votes. Please mark all helpful answers by clicking on the thumbs up next to those answers. If any one answer lead to a solution, please indicate that by clicking on the check mark next to that answer.
0 Likes 0 ·
Grant Fritchey avatar image
Grant Fritchey answered
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.
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I believe you are right. How can I do that? "Are you sure that you have your IP address set to your firewall? ". How can I set my IP address to my firewall? Thank you!
0 Likes 0 ·
estera avatar image
estera answered
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.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.