Websocket Connection Error (was working a day ago)

David Dong 20 Reputation points
2025-05-01T19:48:39.1266667+00:00

I have been running an Azure Web App (Windows) successfully for months with websockets on and yesterday I started receiving Websocket connection error 403s, which prevents my app from starting (it uses Streamlit).

What I've tried:

  • Turning off and on websockets
  • different combinations with affinity cookies on/off
  • different certificate options

I do not have this issue on a similar web app hosted on linux, which defaults to websockets on. Any help would be appreciated!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

Accepted answer
  1. Suresh Chikkam 2,135 Reputation points Microsoft External Staff Moderator
    2025-05-05T14:39:01.97+00:00

    Hi David Dong,

    Thanks for the update, Glad to hear the issue resolved itself. these kinds of intermittent problems can be tricky, especially when they stem from VPN behavior or upstream network layers in Azure.

    Posting this on behalf of David, just for the benefit of the community in case anyone else runs into a similar issue.

    If you're experiencing WebSocket connection failures (such as 403 errors) on an Azure Web App—especially for apps like Streamlit that rely on WebSockets—and everything was working previously, here are a few things to check:

    Make sure WebSockets are still enabled in the App Service configuration.

    Ensure the app is using wss:// if HTTPS is enforced.

    Review access restrictions, authentication settings, and custom domain mappings that might affect WebSocket headers or TLS.

    If you're connected through a VPN or proxy, test the app outside that network—some VPNs interfere with WebSocket upgrades.

    Also test in a clean browser session or incognito mode to rule out extensions or pop-up blockers.

    In David’s case, the issue resolved itself after a few days, likely due to VPN interference or a transient issue upstream in Azure.

    Hope this helps someone facing a similar issue.

    Please do not forget to click "Accept the answer” and Yes wherever the information provided helps you, this can be beneficial to other community members.

    User's image

    If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.

    0 comments No comments

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.