Search code examples
blazorblazor-webassembly

Why is there a SignalR web socket connection in a barebones Blazor WebAssembly project?


I created a new barebones Blazor WebAssembly project and just inspecting the initial downloads and latency that's expected. However I was not expecting a SignalR web socket connection as it's a client app, and not the server version of Blazor which uses SignalR at its core. Why is my Blazor WAZM project using SignalR? I thought it might be to load all of the initial .NET runtime resources faster vs. http but that doesn't appear to be the case, and where is this configured please? I'm not going to change it, but would like to understand it fully as this wasn't what I was expecting.

Network output: enter image description here Physical call in trace:

Request URL (note: **browserLinkSignalR**): ws://localhost:60525/179d598a93704694ae130b00995965d7/browserLinkSignalR/connect?transport=webSockets&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAH1UFWPLRq0iqQHflT2xYeQAAAAACAAAAAAADZgAAwAAAABAAAAC67QHq8stecCuv3CRLw1AJAAAAAASAAACgAAAAEAAAAM%2FXIiNXL8Ba%2Bbl%2B5TYEiBgoAAAAkRXf3%2FgcWA2ic3QvQvJev9egqIHVTj8mg3jjhrlyVS8DgPhicYXbCxQAAAAdkzbeua8vsSifbfffxqMnU%2BVSFA%3D%3D&requestUrl=https%3A%2F%2Flocalhost%3A7188%2F&browserName=&userAgent=Mozilla%2F5.0+(Windows+NT+10.0%3B+Win64%3B+x64)+AppleWebKit%2F537.36+(KHTML%2C+like+Gecko)+Chrome%2F105.0.0.0+Safari%2F537.36&browserIdKey=window.browserLink.initializationData.browserId&browserId=04a2-38b0&tid=7


Solution

  • The websocket connection is created by Browser Link, a Visual Studio feature that uses SignalR to create a communication channel between Visual Studio and the browser. It is used for client-side development.