Issue provisioning IIS 7.5 server using Web Farm Framework 2


We have WFF 2.5 installed, and have used it to successfully configure a farm and provision a secondary server in our test environment.

Our environment (controller, primary, secondary servers) is Windows 2008 Server Web Edition R2, running IIS 7.5, with WFF 2.5 installed.

We have ongoing issues with a .tmp file in an app pools related directory being locked. Process Monitor indicates that it is the worker process (w3wp.exe) locking the file.

The exact error message is Failed to run operation "ProvisionApplications". Failed to run method "Microsoft.Web.Farm.SyncApplicationsRemoteMethod" on server "abc". Exception in response stream. An error was encountered when processing operation "Delete File" on "ABC85DA.tmp". The error code was 0x80070020. The process cannot access "C:\inetpub\temp\appPools\ABC85DA.tmp" because it is being used by another process

If I shut down the Windows Process Activation Service which AFAIK hosts the worker process, the error goes is solved.

Obviously, however , to bring the server online, we need to start the service, and as soon as we do, the automated provisioning step fails, and WFF marks the server as unhealthy, and takes it out of the farm.

I have tried to turn Application Provisioning off by unchecking "Enable Application Provisioning" under the Application Provisioning Module, but the operation still seems to fire every 30 seconds.

So – two problems really:

  1. How to solve the file locking issue on the App pool temp file.

  2. How to turn off automated application provisioning operation on secondary servers? (this is really a second prize workaround in case there is no solution to problem 1)


Best Answer

I managed to get around the issue by updating the ignore list in c:\windows\system32\inetsrv\conf\applicationHost.config on the web farm controller. I updated the web farm section to skip the provision of the appPool and logFiles folders, this seems to have fixed the issue for me.

    <applicationProvision offlineWhileSync="true" syncWebServerFromPrimary="true" periodicSync="00:00:30">
        <clear />
            <skip name="appPools" skipDirective="objectName=dirPath,absolutePath=.*appPools.*" />
            <skip name="logFiles" skipDirective="objectName=dirPath,absolutePath=.*LogFiles.*" />