Azure Login failed for user? System.Data.SqlClient.SqlException Azure Login failed for user? System.Data.SqlClient.SqlException azure azure

Azure Login failed for user? System.Data.SqlClient.SqlException


This error indicates that your username/password is incorrect. If this was due to a Firewall issue, you would have gotten an error message stating something like this:

Firewall check failed. Cannot open server 'XXXXXXXXX' requested by the login. Client with IP address 'XXXXXXXXX' 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 rule for this IP address or address range. It may take up to five minutes for this change to take effect.

Typically, SQL Azure usernames are part username and part server name, like so: stefan@xxxxxxx

Please ensure that you've specified correct SQL Azure username and password


Managing logins in the SQL Azure world are unfortunately difficult. For example, SQL Server Management Studio doesn't let you add new logins and users via the GUI. Things have to be done using T-SQL.

To start, when you first created the database using the Azure Portal, did you use Stefan as the login name? That is important because Stefan becomes takes on the dbo database role (admin). Otherwise, you need to create new users and assign permissions.

Second, in the Azure Portal, locate your database and click on manage. Try to login on via that webpage using Stefan. If that doesn't work then you have the wrong username or password. If it does work, open up Management Studio and connect to your SQL Azure db, using Stefan. Then use this Microsoft guide to troubleshoot: Managing Databases and Logins in Windows Azure SQL Database