How to deploy VS websocket server code to azure

Peter Daniels 40 Reputation points
2024-01-23T20:34:06.5833333+00:00

SnehaAgrawal-MSFT, I am new to Azure deployment and a novice programmer. I have successfully deployed a websocket client to Azure, using html and javascript and it is running, communicating to a websocket server from a demo website. I would like to implement my custom websocket server in my Azure account. Do I create and deploy a separate VS 'websocket server app' to Azure in the same way as the client app? Or, is there a specific way in which the websocket server code must be deployed to register it as a server on Azure. How do I determine the wss uri to use once deployed to Azure so I can adjust my client code? I'm new to this and would appreciate as much detail as possible about this process. Thank you!

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
832 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,538 questions
{count} votes

Accepted answer
  1. Pramod Valavala 20,511 Reputation points Microsoft Employee
    2024-01-24T20:30:07.4533333+00:00

    @Peter Daniels Deploying a project from VS does not really change even if you are using WebSockets. The quickstart doc should help you deploy the application and App Service "runs" the application for you.

    As for WebSockets support, make sure you enable the setting in the configuration blade. And the URL itself would not be any different from what you would use for local development, apart from the domain.

    That being said, like Lex mentioned in his comment, you might want to consider Azure Web PubSub which is a service that is designed for WebSockets Hosting at scale.

    0 comments No comments

0 additional answers

Sort by: Most helpful