skip to Main Content

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


  1. Chosen as BEST ANSWER

    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.


  2. Glad @dimitri that you have solved the issue with the following steps:

    1. Removing the .csproj duplicate files.
    2. Finding the method that causes failing using Application Insights.

    In General, Http Error 500 in the .NET 6 EF Project to Azure means:

    1. There could be issues in Configuration of Azure App Service or with the .NET 6 Runtime, dependencies.
    2. Review the Configuration Settings thoroughly in Azure App Service and logs for the error messages and traces.
    3. There is an option in the Azure App service that provides more insights about any Http Errors if detected.

    Azure Portal > App Service > Diagnose and Solve problems >

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search