May 2017
Intermediate to advanced
518 pages
10h 6m
English
With the NetworkTrafficRules element you can specify how a role communicates with other roles. Somewhat more specifically, it can limit which roles can access the internal endpoints of the specific role.
A NetworkTrafficRules is not a standalone element, but it exists only in combination with a WebRole or a WorkerRole. A NetworkTrafficRules may be provided for more than one role.
A template of a NetworkTrafficRules element looks like this:
<ServiceDefinition ...> <NetworkTrafficRules> <OnlyAllowTrafficTo > <Destinations> <RoleEndpoint endpointName="<name-of-the-endpoint>" roleName="<name-of-the-role-containing-the-endpoint>"/> </Destinations> <AllowAllTraffic/> <WhenSource matches="[AnyRule]"> <FromRole roleName="<name-of-the-role-to-allow-traffic-from>"/> ...