Blazor Server side app Failed to connect via WebSockets

John Woakes 20 Reputation points
2023-01-18T19:40:21+00:00

I have a Blazor web app that used to run fine in Azure. The latest deployment does not work. It works fine locally on my development machine. Looking at the developer tools in Chrome I see this message:


[2023-01-18T19:02:18.263Z] Warning: Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling.

log @ blazor.server.js:1

[Violation] 'setInterval' handler took 138ms


I have tried different browsers and different machines. The app loads but only shows basic layout without any data.

Developer technologies .NET Blazor
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2023-01-20T14:16:00.71+00:00

    Hey @John Woakes based on the error message, I would check to make sure that Web Sockets weren't disabled for your app service. If you're not familiar with this setting, it's in General Settings under the Configuration blade.

    User's image

    If it's enabled, then check for any firewall rules or NSGs that may have inadvertently applied to your app service. If none are applied, then we'll need to work more closely with you regarding this matter. You can reach out to me via email to AzCommunity[at]microsoft[dot]com ATTN: Ryan. Make sure you include your app service name and a link to this post.

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.