KöpBuy
1-855-856-7678
SupportSupport
A role instance may indicate that it is in one of two states: Ready or Busy. If the state of a role instance is Ready, it is prepared to receive requests from the load balancer. If the state of the instance is Busy, it will not receive requests from the load balancer.
The following code example shows how to write out the status of the role instance:
public override bool OnStart() { RoleEnvironment.StatusCheck += RoleEnvironmentStatusCheck; return base.OnStart(); } private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e) { Trace.WriteLine("The status of the role instance: " + e.Status, "Information"); }