Error running Lync Server 2010 Setup – Cannot read configuration file because it exceeds the maximum file size

I ran into this error when re-running Lync Server 2010 Setup (commonly known as “bootstrapper”) on a bunch of Front End and Director servers recently after changes had been made to URLs. I hadn’t seen it before so thought it’d be worth highlighting.

Problem

After bootstrapper finished running the Enable-CsComputer cmdlet on the Front End or Director Server, it completes with the following error:

“Command execution failed: Filename: //?/C:/Program Files/Microsoft Lync Server 2010/Web Components/External Website/web.config
Error: Cannot read configuration file because it exceeds the maximum file size.”

After some research I worked out this was because the default IIS web.config file size is 250 KB and the web.config file of each Lync Front End server may exceed this in a large deployment. It’s important that the web.config file is updated properly because it contains things like updated Simple URLs/McxNotification URLs that may have been changed in the Lync topology for that server.

Resolution

The resolution to this was a quick edit of the registry on each Front End and Director Server. As with any registry edit, make sure you know what you’re doing. If you don’t, do a backup first and then proceed.

  1. Firstly within Registry Editor, navigate to HKLM/SOFTWARE/Microsoft/InetStp (I know it should be backslashes, WordPress doesn’t like them for some reason).
  2. Create a key called Configuration.
  3. Within this key create a DWORD value named MaxWebConfigFileSizeInKB. 
  4. Set the base to Decimal and then set it to however big your web.config file has become. In my case it was 380 KB, so I set the value to 400 KB (or 190 in Hexadecimal, as below).
  5. Run an iisreset from the Run command after this for changes to take affect.
  6. After iisreset has completed, run the Lync Server 2010 bootstrapper again. It should complete with no errors now.

It’s doubtful you’ll run into this issue, but it’s still a good one to be aware of if you’re planning a new large deployment.

3 thoughts on “Error running Lync Server 2010 Setup – Cannot read configuration file because it exceeds the maximum file size

  1. Pingback: Error running Lync Server 2010 Setup – Cannot read configuration file because it exceeds the maximum file size | Justin Morris on UC « JC’s Blog-O-Gibberish

  2. Pingback: Error running Lync Server 2010 Setup – Cannot read configuration file because it exceeds the maximum file size | Justin Morris on UC « JC’s Blog-O-Gibberish

  3. Richard

    I indeed faced this issue a couple of weeks ago. The reason: there were millions of SIP domains in the topology, so the web.config file was grown extremely large.

    Reply

Leave a Reply to Richard Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.