2

If I have a Web App (ASP.NET MVC) deployed in Azure and I also had a Web Job configured to run alongside the web app, my understanding is that the Web Job is an console application (or sorts) that runs and waits on message from a queue.

When a message arrives, can the WebJob call the WebApp using a local address:

http://localhost:4564/api/myFunc

as opposed to:

http://mynewapp.azurewebsites.net/api/myFunc

(1) can it be done? (2) Does it make sense to do?

Thanks!

Glenn Ferrie
  • 10,290
  • 3
  • 42
  • 73

2 Answers2

4

No it is not possible for the WebJob to directly send requests to the site via localhost. This limitation is documented on the sandbox page.

David Ebbo
  • 42,443
  • 8
  • 103
  • 117
0

Apart from the fact that communicating with a localhost without proper set up (described here) may be blocked, i see no potential blockers. But i would still avoid such implementation to avoid any hiccups and go with one of the approaches described here in the answer (consider shared storage option).

Community
  • 1
  • 1
Alex Belotserkovskiy
  • 4,012
  • 1
  • 13
  • 10