Setting up Shared configuration on IIS 7.0

Posted: Jan 12, 2009  8 comments  

Average Rating

Tags
Configuration

Problem: When IIS 7.0 server is configured to work in shared configuration mode then configuration files are stored on a file share. This configuration is recommended for setting up web farms. But in case file share goes offline, the whole set up fails and web servers stop responding. Moreover when the file share comes up again, IIS server is not able to detect it gives following error message:

HTTP Error 500.19 - internal server errorThe requested page cannot be accessed because the related configuration data for the page is invalid.

We have to do an IISreset to start the web servers again after this.


Resolution: Follow the below given 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.

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.

Many thanks to Amol Mehrotra for helping with the content.

Comments

  1. Anonymous
    January 13, 2009

    I always use DFS to replicate the .config files so that each server has a physical copy of the file locally.  This eliminates the need for offline files, and the possibility that the file is unavailable.

  2. Anonymous
    January 13, 2009

    Thanks very much for sharing this...I appreciate seeing another alternative to DFS.

  3. Anonymous
    January 15, 2009

    how would you set this up using dfs?

  4. jbkb
    January 20, 2009

    man i got some pc issues is there any willing to explain some of this stuff to me please?

  5. Anonymous
    February 1, 2009

    thank you ^_^

  6. Bret Bentzinger
    February 26, 2009

    I found you need Desktop Experience installed for Offline Files to work:

    msdn.microsoft.com/.../cc296092(VS.85).aspx

  7. aplevine
    September 15, 2009

    How do you schedule the offline files to sync using a domain account?

  8. 2revup
    November 23, 2009

    So I have these setup in my production environment but when the primary webserver (the server sharing the config) reboots all server participating in the web farm all die...

    whats funny is that from the OS I can get to the shared offline files by using explorer but IIS refuses to open, saying it cant open the shared location...

    Any bright ideas?

Submit a Comment

Microsoft Communities