使用localhost终结点从Web作业访问Azure Web App? [英] Access an Azure Web App from a Web Job using the localhost endpoint?

查看:63
本文介绍了使用localhost终结点从Web作业访问Azure Web App?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在Azure中部署了Web应用程序(ASP.NET MVC),并且还配置了Web作业以与Web应用程序一起运行,则我的理解是Web Job是运行的控制台应用程序(或排序方式)并等待队列中的消息.

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.

消息到达时,WebJob可以使用本地地址来调用WebApp:

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

http://localhost:4564/api/myFunc

相对于:

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

(1)可以完成吗?(2)这样做有意义吗?

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

谢谢!

推荐答案

否,WebJob不可能直接通过本地主机将请求发送到站点.此限制记录在沙盒页面.

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.

这篇关于使用localhost终结点从Web作业访问Azure Web App?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆