0

I was supposed to set up a localhost for a user. But it turned out that the website is on an SQL server and not MySQL.

I installed wamp and the website runs fine. But wherever there is a database connection, it tries to connect to the remote server, which doesn't give access. I have some visual studio and configuration files and what not. And I am clueless about what to do.

The website on the localhost tries to connect to the remote server, but i get this message: "Could not connect. Array ([0] = ... Login failed for user '####'... cannot open server '########' requested by client. client with ##### IP is not allowed to access this server. To enable access, use the SQL Azure Portal or run sp_set_firewall_rule on master database..

I also have this bit of code in the connection file, that i think shows that the database is hosted on this website:

$srver = "http://########.cloudapp.net/";

Any help will be appreciated!

salmanhijazi
  • 817
  • 2
  • 13
  • 25

1 Answers1

0

When you configure SQL Azure, you can specify what the allowed IP addresses are. As the error message indicates, the requesting IP is not authorized to access that database.

billinkc
  • 59,250
  • 9
  • 102
  • 159
  • if you find yourself needing to change your Firewall settings a lot, you might want to check out my answer here [http://stackoverflow.com/a/8595035/333730] which allows you to change firewall rules with Powershell. – cory-fowler Dec 21 '11 at 19:28