Configuring Shared Configuration with Offline Files in IIS 7
Follow the below steps to set up shared configuration with offline files (client side caching) enabled.
Step 1: On the Web server, in Control Panel, open Offline Files.
Step 2: In the Offline Files dialog box, click Enable Offline Files. Do not reboot the machine yet.
Step 3: Ensure that the cache is set to read only by running the following command:
REG ADD "HKLM\System\CurrentControlSet\Services\CSC\Parameters" /v ReadOnlyCache /t REG_DWORD /d 1 /f
Step 4: Reboot the Web server.
Step 5: Browse to the file share folder from web server. Right click and select “Always Available Offline”.
Step 6: Go to control panel -- > Offline Files. Select Schedule option.
The sync center option is available on Windows 2008 server only when Desktop experience is enabled.
KB 951043 : You cannot start Sync Center from Windows Explorer on a Windows Server 2008-based computer < https://support.microsoft.com/?id=951043 >
Step 7: Schedule offline file sync after every 1 day or as per the requirement. This could be in minutes too. Even without setting up any scheduler, the moment I change anything in applicationhost.config file, it is reflected on the web server.
Now the web server works fine even if the file share is offline and there is no need of IISReset now.
Note: In Windows Server 2008 R2 (Windows 7), when the share
goes down, the config system will send a special notification to WAS saying that
there was an IO error when accessing the config file. At this time, WAS will
continue using the cached copy of config that it currently has. Meanwhile, it
will continue to poll the config system until the share comes back up (at which
time, it will reload config). While WAS is running with cached config, if you
stop WAS, or reboot the system, your webserver will stop working until the share
comes back up.
Comments
- Anonymous
February 02, 2016
How does this work on a server core system where offline files feature can't be installed?