Muhammad Hasan Khan
Muhammad Hasan Khan

Reputation: 35126

How to discover role instances in Azure?

The code below only prints one instance id per instance even though I'm running 4 instances. Is this a bug in development fabric or this is how it is supposed to be?

public override void Run()
{
    foreach (RoleInstance roleInst in RoleEnvironment.CurrentRoleInstance.Role.Instances)
    {
        Trace.WriteLine("Instance ID: " + roleInst.Id);
    }
}

Upvotes: 3

Views: 1210

Answers (1)

user94559
user94559

Reputation: 60143

You need to have at least one internal endpoint for all the role instances to show up.

Upvotes: 4

Related Questions