Running nodeJs websocket application on windows app service

Barder 1 Reputation point
2020-08-07T17:16:02.303+00:00

I am hosting a nodeJs websocket application on windows app service. I have also enabled the websockets from azure portal in web app configuration. Still the application is not able to get stream of websocket.

I tried upgrading from Free tier to D1 tier but no luck.

I am getting 500 error in logstream.

What is the resolution to this ?

My nodeJs app works perfectly fine on local environment.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,268 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,286 Reputation points
    2020-08-07T23:12:15.143+00:00

    Hi @Barder ,

    Can you try adding "webSocket enabled=false" in your web.config. it may look confusing but this web.config setting turns off the IIS WebSockets support module (iiswsock.dll) since it isn’t needed by node.js. Nodej.js on IIS includes its own low-level implementation of WebSockets, which is why the IIS support module needs to be explicitly turned off.

    Hope that helps. please let us know if you have further questions.

    Thanks,
    Grace