0
votes

I have come across a document on Azure Sandbox mentioning we can communicate between processes within WebApp Sandbox over TCP as well as named pipes. I have WCF service deployed as WebJob, I can communicate between two WebJobs deployed within WebApp Sandbox over TCP as well as Named Pipe. Problem occurs when I try to communicate from WebApp. I get same error as mentioned in Sandbox Documentation (https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#local-address-requests).

One strange thing I see in Kudu is there are two separate w3wp.exe running, one for Web App and other for SCM (WebJob etc). And somehow looks like there is no communication possible over port/named pipes between them.

enter image description here

Does anyone have more details on how to access this service?

3

3 Answers

0
votes

Note: you cannot communicate through localhost in Azure Websites (or WebJobs) and cannot listen on a port that is not 80/443.

IF you just want to deliver message, you could use file-system to communicate. You write a file from the WebJob and use a FileSystemWatcher to monitor the file changes.

Or you can use web socket to communicate between each other with SignalR, you can refer to this blog.

If you still have questions , please let me know.

0
votes

The communication only works if the TCP or namedpipe service is running on the main site. SCM site as a client can talk to it. The other way around (which is what you want) is not supported due to some limitation.

0
votes

I explored a bit more and found the closest answer is to set WEBSITE_DISABLE_SCM_SEPARATION=true in App Settings. This will enable WebApp and SCM processes work in same sandbox. Unfortunately this option is deprecated by Azure and no longer supported. Thanks all for attempting the answer. More information can be found here.