Web 服务绑定到 Windows Azure 中的 Web 角色?

发布于 2025-01-04 15:21:21 字数 136 浏览 3 评论 0原文

我一直困惑一个问题:在 Windows Azure 中实现的 Web 服务是否必须以 Web 角色运行,或者是否可以让它以辅助角色运行?如果是这样,是否有其他方法来监视 http 流量,因为工作角色不允许访问 IIS 日志?

BR/克里斯特

I am stuck with the question if a Web Service implemented in Windows Azure have to run in a Web role, or is it possible to have it run in a Worker role ? If so, is there an alternative way to monitor the http-traffic, because a Worker role don't give access to the IIS logs ?

BR/Christer

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别念他 2025-01-11 15:21:22

您可以通过 ServiceHost 在辅助角色中运行 Web 服务(如果需要,您也可以在 Web 角色中使用 ServiceHost 运行它们)。默认情况下,IIS 不会在辅助角色中激活,这就是您没有 IIS 日志的原因。

您可以查看多个 WCF 性能计数器,但您可能需要查看网络性能计数器以获取字节级详细信息。

编辑:为了解决如何访问性能计数器的问题:应保留使用远程桌面以用于调试目的。相反,最好使用诊断监视器收集性能计数器,然后将它们发布到 Windows Azure 表存储以供外部访问。请参阅本文以快速了解Windows Azure 和性能计数器。本文介绍了如何手动查询性能计数器(发布到 WADPerformanceCountersTable)。您还可以通过 Visual Studio(安装 Windows Azure 工具后)或通过第 3 方工具(例如 Cerebrata Azure 诊断管理器

You can run your web services in a Worker Role via ServiceHost (you can also run them with ServiceHost in a Web Role if you wanted). By default, IIS isn't activated in a Worker Role, which is why you don't have IIS logs.

There are several WCF performance counters you could look at, but you probably need to look at networking performance counters for byte-level details.

EDIT: To address question of how to access performance counters: using Remote Desktop should be reserved for debugging purposes. Instead, it's better to collect performance counters with the Diagnostic Monitor, then publish them to Windows Azure Table storage for external access. See this article for a quick intro to Windows Azure and performance counters. The article shows how to manually query the performance counters (which get published to WADPerformanceCountersTable). You can also view this table through Visual Studio (once you install the Windows Azure tools), or through 3rd-party tools such as Cerebrata Azure Diagnostics Manager.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文