Web场框架排除文件夹

目前正在掌握Web Farm Framewor和ARR。 主服务器和辅助服务器按照原样从主服务器同步到次服务器。 但是,有一个正在同步的caching文件夹,从而导致辅助服务器变得不健康。

所以希望有人可以解释如何尽可能排除文件夹在两台服务器之间的同步。

干杯杰米

试试这个页面

从供应中排除文件夹

  1. 在控制器机器上,打开ApplicationHost.config文件。 这是在%windir%\ System \ inetsrv \ config目录下。

  2. 在applicationProvision元素下面,添加一个条目以跳过指令,如下所示

     <webFarms>
         <webFarm serverAutoStart =“false”name =“Farm”
    启用=“真”
     adminUserName = “{0} \pipe理员”
     ADMINPASSWORD =” PWD” 
     primaryServer =“演示初级”>
             <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. 当您保存更改时,Web Farms Framework会立即从configuration文件中获取更改并进行应用程序configuration。

  4. validation只configuration了Folder2的辅助服务器,并排除了Folder1。

  5. 您也可以跳过绑定,如下所示:
    <skip name="folder1" skipDirective="attributes.protocol=https" />

  6. 或者,也可以使用msdeploy命令直接为每个辅助服务器同步特定目录,如下所示:

      C:\> cmd.exe / c“”%ProgramFiles%\ IIS \ Microsoft Web
    部署\ msdeploy.exe“-verb:sync
     -source:contentPath =“默认网站”,computerName = demo-primary
     -dest:contentPath =“默认网站”-skip:objectName = dirPath,absolutePath =。* folder1。*“