Azure SQL Database
An Azure relational database service.
6,091 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have an ASP MVC app on Azure App Service.
The app uses Managed Identity to connect Azure SQL database.
All is working correctly, but from time to time app stops working and I have an error
System.Data.SqlClient.SqlException: Login failed for user '
Hi ,
Thanks for reaching out to Microsoft Q&A.
Possible Root Causes:
Probable Fix:
RetryLogic
feature in Microsoft.Data.SqlClient
to automatically retry transient failures.db_datareader
, db_datawriter
) on the Azure SQL DB.Best Practices
Microsoft.Data.SqlClient
package.Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.