I have created a user register controller to register users with repository design pattern. My controller looks like this.
[Route(\"api/[controller]\")]
I spent hours on this. My problem was that I had:
[HttpPut("{matchGuidStr}/join")]
public async Task<IActionResult> JoinNewMatch (string matchGuidStr) {
instead of:
[HttpPut("{matchGuidStr}/join")]
public async Task<IActionResult> JoinNewMatch (string matchGuidStr, [FromBody] Payloads.JoinGamePayload payload) {
basically, my route didn't care about the request body at all (intentionally) but I needed to still pass it as a parameter. yikes!
In my case, was the query wrong:
SELECT * FROM dbo.person WHERE login= 'value' && pass = 'value'
Solved after fix &&
wrong AND
ok
SELECT * FROM dbo.person WHERE login= 'value' AND pass = 'value'
i have same error, check maybe you put (AutoValidateAntiforgeryTokenAttribute) in AddMvc Services
services.AddMvc(opt => {
//Prevent CSF Attake For POST,PUT,DELETE Verb
//opt.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
})
Had the same issue running a Dotnet 2.2
and NGinx
on remote Ubuntu 18.04
-machine, got a:
.. . the application completed without reading the entire request body
on every API-call. What solved it for me was to install the SSL Certificates on the host through CERTBot from Let's encrypt, since Dotnet
doesn't allow un-encrypted traffic.
Hopes this helps someone