400 status error when posting form data in ASP.Net

2019-04-26 08:09发布

问题:

I am developing an ASP.Net Core 2.0 application and run it on Linux/Nginx/Kestrel.

On the development environment (Windows 10) everything runs smoothly. Also when running the app with "dotnet run" in the project directory.

On the production environment (Debian 8/Kestrel) all form POSTs fail with HTTP status code 400 (Bad Request) without prompting any error in the console, while form GET requests run fine. All other messages (warnings, errors) are prompted in the console. I am running the application using "dotnet .dll".

Can anyone point me into a direction to solve the issue?