How to configure Azure Websites to communicate with Azure WebRole on Internal Load Balancer Endpoint

I recently worked on configuring Azure Websites to communicate with Azure Web Role on Internal Load Balancer(ILB) Endpoint. The requirement was that the Azure WebRole should not have an external endpoint.

There are 3 things to configure:

1. Configure Azure Websites Virtual Network . If you plan to first create Virtual Network, make sure to have a Dynamic routing gateway and to have Point to Site enabled.

2.  Configure  Internal Load Balancer in the Azure WebRole. (Review the section Internal Load Balancing (ILB) in the referenced article). The changes are to Azure Web Role cscfg and csdef files.

3. Configure the Web Role to connect to Virtual Network  

4. Get the IP address of the Internal Load Balancer (ILB) using Powershell: Get-AzureDeployment -ServiceName websitetowebroleilbvnet2 | Get-AzureInternalLoadBalancer

5. The final config(cscfg) file for the Web Role will look like:

 <VirtualNetworkSite name="VNET NAME" />


      <InstanceAddress roleName="WebRole1">


          <Subnet name="Subnet-1"/>





      <LoadBalancer name="FaridaLB">

        <FrontendIPConfiguration type="private" subnet="Subnet-1" />





6. In the WebRole definition file, reference the load balancer



      <InputEndpoint name="Endpoint1" protocol="http" port="80" loadBalancer="FaridaLB" />