- IIS on Microsoft Lync 2010 FrontEnd or Director server shows error message 'Cannot read configuration file because it exceeds the maximum file size'.
- User tries to view Dial-in Settings. They click on Tools > Dial-in Conferencing Settings in Lync client. Error message "500 - Internal Server Error' message is shown in the opened page.
- The following window appears when user tries to login. The valid credentials are not accepted
CauseAdding a new SIP domain in Lync 2010 causes adding corresponding rewrite rules which are stored in the web.config file.
When there are a lot of SIP domains (about 85), the size of web.config exceeds the default file size restriction and IIS shows error 'Cannot read configuration file because it exceeds the maximum file size'.
ResolutionThe following steps allow to increase the maximum size of web.config.
- Open registry editor - Start > Run > regedir.exe.
- Navigate to key: HKLM\SOFTWARE\Microsoft\InetStp\Configuration (If there is no 'Configuration' key, create it)
- Add/change DWORD value MaxWebConfigFileSizeInKB. The default value is 250 KB. Each SIP domain requires about 3 KB for rewrite rules, so the new value should be not less than 3 * (expected count of SIP domains).
- Run "iisreset" command in CMD to apply the new restriction value.