Azure Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'null'

I wrote an app and I am trying upload it on Azure. The app runs ok locally and has a SQL Server database as the backend; the app is based off MVC.

When I try to access a page such as /person, I get this error:

  • Debugging stored procedure in SQL Server 2005 from Visual Studio?
  • How to call SQL View Dapper c#
  • similar excel match function in SQL
  • dynamic pivot in sql
  • foreign key data deletion should display error for primary key
  • Looping through XMLs in folder using openrowset / “Must declare the scalar variable” Issue
  • Azure Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'null'.
    

    Anyone ever dealt with such an error and how did you resolve it.

    I have tried a few suggestions but none seems to work:

    • adding to config file
    • setting Persist Security Info=False to true

    What is the best way to solve this?

    One Solution collect form web for “Azure Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'null'”

    On the app’s data connection, the connection string had no userid. Adding a userid fixed the issue. Even though when the app was published with a proper connection string, the user id was empty.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.