2

Currently getting to grips with Web Farm Framewor and ARR. The Primary and Secondary servers are syncing from Primary to Secondary as they should be. However, there is a cache folder that is being synced which in turn causes the Secondary server to become unhealthy.

So was hoping somebody could explain how to exclude folders from syncing between the 2 servers if possible.

Cheers Jamie

Jamie
  • 21
  • 3

1 Answers1

3

Try this page

To exclude folders from provisioning

  1. On the controller machine, open the ApplicationHost.config file. This is under the directory %windir%\System\inetsrv\config.

  2. Under the applicationProvision element, add an entry to skip the directives as follows

    <webFarms>
        <webFarm serverAutoStart="false" name="Farm"
    enabled="true"
    adminUserName="{0}\administrator"
    adminPassword=”pwd” 
    primaryServer="demo-primary">
            <server address="demo-primary" enabled="true" />
            <server address="demo-secondary" enabled="true" />
            <platformProvision syncPlatformFromPrimary="true" />
            <applicationProvision syncWebServerFromPrimary="true">
                <skipDirectives>
                    <skip name="folder1" skipDirective="objectName=dirPath,absolutePath=.*folder1.*" />
                </skipDirectives>
            </applicationProvision>
        </webFarm>
    </webFarms> 
  3. When you save the changes, Web Farms Framework immediately picks up the changes from the configuration file and does application provisioning.

  4. Verify that the secondary servers provisioned only Folder2, and Folder1 was excluded.

  5. You can also skip binding as follows:
    <skip name="folder1" skipDirective="attributes.protocol=https" />

  6. Alternatively, you can sync a specific directory using the msdeploy command directly for each secondary server as follows:

    C:\>cmd.exe /c ""%ProgramFiles%\IIS\Microsoft Web
    Deploy\msdeploy.exe" -verb:sync
    -source:contentPath="Default Web Site",computerName=demo-primary
    -dest:contentPath="Default Web Site" -skip:objectName=dirPath,absolutePath=.*folder1.*"
Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
Antonio
  • 71
  • 2
  • 1
    @Antino - Welcome to Server Fault! Just a tip, it's generally a good idea to include the important excerpt from the page you've linked to, as links on the internet go dead all the time (esp. links from iis.net as they seem to re-structure their URLs all the time). I've added it in for you. – Mark Henderson Jul 01 '11 at 03:02