XHR POST: to API Controller works, to Razor Page fails
问题 I have a standard ASP.NET Core Web application created from the Visual Studio template. I have a razor page which issues an XHR POST request with a payload upon a change event. If I make the url of the request an api controller in the application (i.e. under Controllers folder), the request succeeds. If I make the same request, same payload to a razor page method (under Pages folder), it fails with http 400. Both methods have the same signature. Can anyone describe why the behaviour is