Thanks for asking question! Could you please confirm if you running on Linux Free sku ?
As "Web Sockets are not currently supported for Linux apps on Free App Service Plans. We are working on removing this limitation and plan to support up to 5 web socket connections on Free App Service plans."
You may refer to this doc link: https://learn.microsoft.com/en-us/azure/app-service/faq-app-service-linux#web-sockets
Incase you are on running on windows please confirm if you have enabled the Web sockets on from configuration tab.
Check this link: https://azure.microsoft.com/de-de/blog/introduction-to-websockets-on-windows-azure-web-sites/?WT.mc_id=-blog-scottha
Let us know if you have further query on this or issue remains.