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.
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.
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.
- Firstly within Registry Editor, navigate to HKLM/SOFTWARE/Microsoft/InetStp (I know it should be backslashes, WordPress doesn’t like them for some reason).
- Create a key called Configuration.
- Within this key create a DWORD value named MaxWebConfigFileSizeInKB.
- 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).
- Run an iisreset from the Run command after this for changes to take affect.
- 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.