Reputation: 128
I have deployed an Azure webjob that is running as a web socket server. I can see by the webjob log that it is running and waiting for sockets to connect. I cannot figure out what the external web address is to that socket server.
Let's say my azure site is http://abc.azurewebsites.com and my webjob is called abc-server within the azure portal.
I've tried ws://abc.scm.azurewebsites.net and ws://abc.scm.azurewebsites.net/abc-server
I assume this is possible based of this post: https://mikewaniewski.wordpress.com/2015/06/14/websocket-client-as-azure-webjob/
Upvotes: 0
Views: 479
Reputation: 7392
This is not possible with WebJobs. The blog post is talking a WebSockets client, not a server. You can't run a server in the webjob and expect it to be able to listen to external traffic. In fact you can't listen to external traffic on ports other than 80
and 443
, and the IIS worker process w3wp
is already listening on both. If you want to run a WebSockets server then you'll need to deploy a normal WebApp, not a WebJob. It depends on what stack you're using, but Azure WebApps supports WebSockets and it should work with most stacks like ASP.NET, NodeJs, etc.
Upvotes: 1