Web Farm Framework and proxy servers: Part 3

In part 1 and part 2 of this series, I talked about working around situations where the WFF controller and/or farm servers needed to access a proxy server to be able to pull the RSS feed used by the platform provisioning piece.

In this edition, we’ll discuss why those workarounds are no longer needed. With the availability of the WFFv2 servicing release, the product now has proxy settings built in! Configuration of the WFF proxy settings is very easy, and can be achieved with minimal effort on the administrator’s part.

First, let’s look at the new settings as they exist in the updated webfarm.xml schema:

 

      <element name="defaultProxy">

        <attribute name="enabled" type="bool" defaultValue="false"/>

       <attribute name="proxyaddress" type="string" />

        <attribute name="bypassOnLocal" type="bool" defaultValue="true"/>

        <attribute name="userName" type="string"/>

        <attribute name="password" type="string" encrypted="true" defaultValue="[enc:AesProvider::enc]"/>

        <collection addElement="bypass">

          <attribute name="address" type="string" required="true" isUniqueKey="true" validationType="nonEmptyString"/>

        </collection>

      </element>

 

All of the standard proxy settings are there, including a bypass list, and username and password settings in the event your proxy server requires authentication. Configuring the proxy settings in WFF is pretty simple, and here are a couple of samples:

 

1. To enable the proxy settings for a farm named “Primary”, set the address of the proxy server to “proxyservername:80”, and set proxy credentials (if required):

appcmd.exe set config -section:webFarms /[name='Primary'].defaultProxy.enabled:"True" /[name='Primary'].defaultProxy.proxyaddress:"proxyservername:80" /[name='Primary'].defaultProxy.userName:"testuser" /[name='Primary'].defaultProxy.password:"Password1" /commit:apphost

 

2. To add server names to the proxy bypass list in case you want the servers to bypass the proxy altogether when communicating:

appcmd.exe set config -section:webFarms /+"[name='Primary'].defaultProxy.[address='app1.arr.lab']" /commit:apphost

 

These are just a couple of quick samples to show you how to set proxy settings in WFF. If you need additional samples, be sure to give Configuration Editor a shot, as it can generate both command line and code-based samples for configuring IIS features.

Remember, to use these new proxy settings, your controller needs to be running the WFF v2.1 update.

1 Comment

Comments have been disabled for this content.