我目前正在使用面料服务的web api。 需要获取织物服务群集的位置(亲和区域)。即通过web API中的代码(c#) 确定当前集群位于哪个位置。 或者我需要Web API托管的集群名称。如何获取位置(关联区域)或名称群集(面料服务)
在webrole或云服务也使用是可能的 https://management.core.windows.net/ {0} /服务/ hostedservices
,但我无法找到任何方式对集群。
我目前正在使用面料服务的web api。 需要获取织物服务群集的位置(亲和区域)。即通过web API中的代码(c#) 确定当前集群位于哪个位置。 或者我需要Web API托管的集群名称。如何获取位置(关联区域)或名称群集(面料服务)
在webrole或云服务也使用是可能的 https://management.core.windows.net/ {0} /服务/ hostedservices
,但我无法找到任何方式对集群。
我不确定这是否有帮助,但看看为项目创建的ServiceEventSource。 ServiceMessage方法向您显示了许多可从服务上下文获得的信息。
ServiceMessage(
service.Context.ServiceName.ToString(),
service.Context.ServiceTypeName,
service.Context.ReplicaId,
service.Context.PartitionId,
service.Context.CodePackageActivationContext.ApplicationName,
service.Context.CodePackageActivationContext.ApplicationTypeName,
service.Context.NodeContext.NodeName,
finalMessage);
你也可以看看FabricClient类
所有的研究后,我与
<Section Name="Affinity">
<Parameter Name="Zone" Value="Eusa" />
</Section>
这在PackageRoot添加>配置>设置做了
不,它没有帮助 – XCode