I understand you’ve configured a WebSocket-based .NET 9 app hosted on a Linux App Service (Basic B2), with traffic routed through Azure Traffic Manager and Application Gateway.
To validate this setup, I deployed a sample WebSocket app to App Service, fronted it with Application Gateway, and registered the App Gateway’s public IP as an endpoint in Traffic Manager.
- App Service URL (Direct): https://venkat-app-ecehcjfmctc0cuhj.canadacentral-01.azurewebsites.net
**Output:
**
- Application Gateway IP: http://130.107.8.41/
Gateway backend Settings
**Backend health
**
Output:
- Traffic Manager Endpoint: [http://test-trafficmanager.trafficmanager.net/]
Traffic Manager endpoint
Output:
The application works as expected when accessed via Traffic Manager, and the WebSocket connection remains functional.
If it's not working on your end, please verify:
- Whether the app is accessible directly from the Application Gateway’s public IP (without Traffic Manager).
- That WebSockets are enabled in App Service.
- That your App Gateway’s HTTP settings have WebSocket support enabled (this must be toggled on explicitly in Standard V2).
- Check browser console and network tab for
wss://
connection errors or CORS issues.
Reference: WebSocket support in Azure Application Gateway
I hope this helps to resolve your issue. Please feel free to ask any questions if the solution provided isn't helpful.
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members