I want to retrieve the endpoint information of other role running in the same hosted service from a instance of different role. How can I do that?
It seems that When I use :
var endpoints = RoleEnvironment.Roles["RoleName"].Instances
.Select(i => i.InstanceEndpoints["RoleName"]).ToArray();
it give me an empty array. I found that .Instances has already return 0 element.
Do anybody know the issue is normal, or it is the problem of my code?
The endpoint I want to get is a Input Endpoint.
I know from that
the reason that why I get 0 instances returned. But even when I can the instance I want, I still can not get the Input Endpoint.
The following is
A role must define at least one internal endpoint in order for its set of instances to be known at runtime.
This means that unless a role defines an internal endpoint you will not be able to enumerate its instances from another role. Consequently, the observed behavior is correct.
Thank you. I have tried your suggestion.
When I add the internal endpoint to the role, I did enumerate the instances of the role.
But from other role, I still can not find the external input endpoint from the enumeration and it seem that I can only get the information of the internal endpoint I defines.
My question is do you know whether Windows Azure supports a role can comunicate other role by using the ipendpoint of input endpoint?
I believe the only way to access the input endpoint of another role is to come in through the load balancer just like an external service or user.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?