开发者

Get RoleEnvironment info from Azure Web Role Accelerator

Is it possible to gain开发者_如何学Go information about the web role from sites deployed onto the Web Role Accelerator? For example, I want to get the instance name that is being used:

 RoleEnvironment.CurrentRoleInstance


Yes.

Under the covers there is nothing particularly special about the Web Role Accelerator -- it's really just a quick way to publish additional sites to a Web role that's already deployed.

RoleEnvironment.CurrentRoleInstance is a static property that can be called from any application, and given that RoleEnvironment.IsAvailable is true you should receive the value you're expecting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜