Bassie
Bassie

Reputation: 10390

Azure suddenly blocks me from accessing my DB

I am seeing this annoying error when trying to access my database:

SqlException: Cannot open server 'SERVER' requested by the login. Client with IP address '000.000.000.00' 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.

Where SERVER is my server name and 000.000.000.00 is not my public IP, but since I'm in a corporate network I guess it could be the how I appear? (also please note I am posting this with that IP as I don't want to share my public IP address.. It is just a placeholder)

when calling

using (db = new ADVWKSPEntities())
{
    items = db.CRMTItems.Include(m => m.ADVUsers).ToList();
}

I don't understand why this is suddenly happening, as I have not changed anything.

I tried adding my IP as an exception as per this post, but I found that my IP was already on the list...

enter image description here

How is this possible? Why would it just suddenly change?

Upvotes: 1

Views: 186

Answers (1)

Bassie
Bassie

Reputation: 10390

I opened up MSSMS to see if I could view the db from there, and it displayed a pop up telling me that I don't have permission to view the file and that I need to log in to my Microsoft account.

It then showed a MS online login popup, which I logged into (and also had to enter my 2FA auth code, which makes no sense as I am on the corporate network, meaning I shouldn't need it) and I could then view the db from inside MSSMS.

Now when I run the application, it seems to let me get the data, but I am facing another issue now which seems unrelated but who knows..

Upvotes: 1

Related Questions