400 status error when posting form data in ASP.Net Core [closed]
Asked Answered
A

0

11

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?

Aurore answered 28/11, 2017 at 10:27 Comment(5)
Do the web server logs say anything? Also, nothing is printed onto the console, how about the response in the network inspector?Gallnut
I'm experiencing the same issue -- but only on Chrome. Have you tried using a different browser?Tabulate
i just fixed a similar issue by changing my nginx config file. can you post the nginx file you had?Psychodiagnostics
@Aurore did you manage to solve this? I have the same issue...Joslin
For who met this issue, I answered on this url: https://mcmap.net/q/1160099/-net-core-nginx-hosting-sockets-doesn-39-t-allow-http-postDiphthong

© 2022 - 2024 — McMap. All rights reserved.