Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why is Blazor using post instead of WebSockets?

I have a Blazor Server app. When I run the app in Visual Studio, I see this message in the Browser console:

 WebSocket connected to wss://localhost:44329/_blazor?id=HX5t9UdbZwj35PkMxV3Fkw.

So it looks to me like SignalR is working as expected. On the Network Tab, I see signalR working as expected with message:

However, now I publish the App to IIS. The app works fine. However, if I look in the browser console, I no longer see WebSocket being connected. What I see in the network tab looks like this:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Request URL: https://blazor/_blazor?id=O_acVtnuEIOjlRAosu1YFg
Request Method: POST

There are many many of these like 1 per second.

So it looks like SignalR is no longer being used.

Why is this? What do I need to do to ensure SignalR is being used?

>Solution :

Make sure WebSockets has been enabled on IIS. Here is a brief overview:

https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading