Relative Content

Tag Archive for c#asp.net-core-webapiblazor-webassembly.net-8.0

.Net8 Blazor WASM client not sending data to webAPI correctly

I have a good, working, webAPI, that works fine from Postman and 2 other dev type clients, however, I cannot get it to take data from a Blazor WASM client (.Net8). I hit the endpoint route (as per the API’s logging system) just fine, but can’t figure out why one particular field is always reported as empty, even when it’s not (the first parameter, so the other fields may be affected).
I thought it was case sensitivity, as the API does have camel-case parameters, so I changed the Blazor app to ensure the fields matched exactly. I added some debugging points, one that prints out the json data being sent to the API, and it’s 100% perfect! (I checked it repeatedly, and there’s no typos or anything like that and it’s perfectly formatted JSON).