I created my deployment profile on Visual Studio, have added my connection string and everything but I get an http 500 error when accessing my azure deployed ASP.NET Core 6 application.
In the publishing settings there is an Entity Framework migrations setting which is failing:
dotnet ef dbcontext list --json
More than one project was found in the current working directory. Use the –project option.
It does not seem to retrieve the migrations although there is just one in my Project.DataAccess
solution.
Recreated the AzureApp Service deployment – did nothing.
Added all the IP addresses in app services in the application Firewall – did nothing
Removed .csproject files duplicates – Solved the error in the publishing settings.
Checked Application Insights – Got The 'AppId' option must be provided. (Parameter 'AppId')
which fails from this method Microsoft.AspNetCore.Authentication.Facebook.FacebookOptions.Validate
2
Answers
Found out the answer thanks to @Paul. I had setup environment variables which could not be found for obvious reasons. Replaced them in my Program.cs and it works fine.
Glad @dimitri that you have solved the issue with the following steps:
.csproj
duplicate files.In General, Http Error 500 in the .NET 6 EF Project to Azure means:
Azure Portal > App Service > Diagnose and Solve problems >