简体   繁体   English

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

[英]Web Service bound to Web role in Windows Azure?

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 ? 我陷入一个问题,即Windows Azure中实现的Web服务是否必须以Web角色运行,或者是否可以使其以Worker角色运行? If so, is there an alternative way to monitor the http-traffic, because a Worker role don't give access to the IIS logs ? 如果是这样,由于Worker角色不提供对IIS日志的访问权限,是否有另一种方法来监视http流量?

BR/Christer BR /克里斯特

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). 您可以通过ServiceHost在工作角色中运行Web服务(如果需要,也可以在Web Role中与ServiceHost一起运行它们)。 By default, IIS isn't activated in a Worker Role, which is why you don't have IIS logs. 默认情况下,“工作角色”中未激活IIS,这就是为什么您没有IIS日志的原因。

There are several WCF performance counters you could look at, but you probably need to look at networking performance counters for byte-level details. 您可以查看几个WCF性能计数器,但是您可能需要查看网络性能计数器以获取字节级详细信息。

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. 相反,最好使用诊断监视器收集性能计数器,然后将其发布到Windows Azure表存储以进行外部访问。 See this article for a quick intro to Windows Azure and performance counters. 有关Windows Azure和性能计数器的快速介绍,请参阅本文 The article shows how to manually query the performance counters (which get published to WADPerformanceCountersTable ). 本文介绍了如何手动查询性能计数器(已发布到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 . 您还可以通过Visual Studio(一旦安装Windows Azure工具)或通过第三方工具(例如Cerebrata Azure Diagnostics Manager )查看此表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM