Export (0) Print
Expand All

RoleInstanceEndpoint.IPEndpoint Property

Updated: May 29, 2012

Gets an IPEndPoint object for the role instance endpoint. The IPEndPoint object provides the IP address and port number for the endpoint.

Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)

public abstract IPEndPoint IPEndpoint { get; }

Property Value

Type: System.Net.IPEndPoint

An instance of IPEndPoint.

The following code example shows how to retrieve the IPEndPoint objects for the running role instances:

foreach (var role in RoleEnvironment.Roles)
   foreach (var roleInst in role.Value.Instances)
      foreach (RoleInstanceEndpoint instanceEndpoint in roleInst.InstanceEndpoints.Values)
         Trace.WriteLine("Instance endpoint IP address and port:" + instanceEndpoint.IPEndpoint, "Information");

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft