I am encountering errors while attempting to run an Entity Framework (EF) update command (dotnet ef database update
) from my ASP.NET Core application. The application is connected to a database hosted on Azure. After executing the EF update command, I am receiving two different errors:
-
An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call.
-
A
DefaultAzureCredential
error indicating failure to retrieve a token from the included credentials, despite attempting troubleshooting steps re-authenticating my Azure account in Visual Studio Code. see the error(This account '***' needs re-authentication. Please go to Tools->Options->Azure Services Authentication, and re-authenticate the account you want to use..
- Stored credentials not found. Need to authenticate user in VSCode Azure Account. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/vscodecredential/troubleshoot
- Azure CLI not installed
- PowerShell is not installed.)
I re-configured my SQL call to use the EnableRetryOnFailure method to enable transient error resiliency expecting this to be resolved but it didn’t fix it. Then followed the troubleshooting guide provided for the DefaultAzureCredential error,re-authenticating my Azure account in Visual Studio Code and unfortunately this didn’t sort it too.
Additionally, the Azure CLI is already installed so not too sure why it’s saying it’s not !
Any guidance or assistance in resolving this issue would be greatly appreciated. Thank you.
Yamen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.