I am programming a blazor server site and I am trying to test it locally with IIS. The site loads fast and runs fast but if I refresh the page it is extremeley slow.
I don’t face the same problem when running the site via Visual Studio.
Found that the problem has to do with the signalR and Websockets.
I have a hub in my code in order to send notifications.
When I remove the hub the page refreshes very fast.
From the IIS log files I get 101 response when the hub (refreshGrHub ) is persistent in code
2024-08-13 13:27:30 ::1 GET /refreshGrHub id=CfYEGcWIaUhzrewhY1kBlQ 8080 – ::1 Microsoft+SignalR/8.0+(8.0.7+2f1db20456007c9515068a35a65afdf99af70bc6;+Windows+NT;+.NET;+.NET+8.0.7) – 101 0 64 7
but I remove the hub, no more error 101 exist.
101 means switching protocols and in this instance it is about to change to Websockets
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/101
So why is this switching protocols so slow? And what can I do for this?
My local machine has Windows 11.