79461548

Date: 2025-02-23 16:33:48
Score: 1.5
Natty:
Report link

For some reason the SignalR didn't deserialize the object I was passing from the hub to my Blazor app properly, so my subscription didn't recognize it. I'm not sure why this only happens when I run Blazor in a container, but that's what I found. It could be related to the fact that the object had the JsonPropertyName attribute on all of its properties, but I'm not really sure, but this object was from a third party library, so I don't have any control over it. I ended up using Newtonsoft to manually serialize the object on the hub and then manually deserialize it on Blazor. That way the hub and client are only dealing with a string. This fixed my problem.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: dogyear