POST request for ASP.NET Core 2.0 site, resulting in a 404 on Azure

I just upgraded the ASP.NET Core 1.1 web application to 2.0 and tested it locally without any problems. However, when the site is deployed to Azure, a POST request that worked locally results in 404 (I think this may be the same for all POST requests, but I cannot log in due to a problem).

Any ideas why this might not work when deploying to Azure, but work fine when running IIS Express locally?

I removed the original deployment slot on Azure and recreated it, like the initial deployment on the slot mixed with the old DLL version 1.1 and the newer DLL 2.0, and prevented the site from working at all.

+1
source share
1 answer

It seems that I have been mistreated with my web application. I assumed that app.UseExceptionHandler("/Error")(by default, my HomeController does not require the host "Home" for / Home / Error) to Startup.csredirect to the error page, but for me it is not.

My main problem was related to a database connection error that caused the POST controller method to fail. I was caught in a response returning 404, not error status.

I will need to learn how error handling works in more detail for the ASP.NET kernel.

0
source

All Articles