✅ Controller method can be invoked from Edge and Postman but not by Firefox
Hi,
I've the following server controller:
Client side (blazor wasm) I invoke such method as follows:
If I launch the server and edge client, the latter retrieves the integer value. Same with Postman.
Using Firefox, on the other hand, I have that the request is sent, the controller returns the correct integer value (I can see that debugging) but it seems like the client is not receiving the answer: from developer tools, there is no status code as well as response header. The "response" tab in developers tool shows the client index.html page with an error:
And of course the parsing fails.
Please note that the controller has another method, a get request returning a list of items, and in that case firefox client retrieves the list of items successfully.
Could you please give me a hand?
3 Replies
The only reason it might be failing in firefox is because firefox is the only browser these days that checks SSL certs properly and you might be trying to visit the
https
url of your api in firefox
and I think only VS and Rider will generate a temp SSL cert for your localhost api url while you're developing the app.
using VsCode or just the terminal dotnet run
won't work
so instead, just use the http
urls Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Now it works fine, after the latest package update I suppose... I'm not sure. It could be due to cache cleaning as well, but I performed it several time, so I don't think that's the reason.
I was already using http by the way, but thank you for the suggestion anyway