While installing SharePoint 2010 Server Service Pack 2 update (and December 2013 CU), I ran into the following error while executing SharePoint Configuration Wizard:
Exception: System.IO.InvalidDataException: The web configuration file, C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\config\WEBCONFIG.ACCSRV.XML, does not have element “configuration/configSections/sectionGroup[@name=’SharePoint’]” or it is invalid.
My troubleshooting steps:
1. Some online posts suggested removing all comments from the affected web applications. I tried it, but it did not work.
2. Ran psconfig from the command line: psconfig -cmd upgrade -inplace b2b -wait -force
3. Three new errors showed up in the logs:
Error # 1: An exception of type Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException was thrown. Additional exception information: An update conflict has occurred, and you must re-try this action.
Error # 2: Exception: Microsoft.SharePoint.Upgrade.SPUpgradeException: Action 4.0.21.0 of Microsoft.SharePoint.Upgrade.SPIisWebSiteWssSequence failed. —> System.NullReferenceException: Object reference not set to an instance of an object.
Error # 3: Exception: Action 4.0.21.0 of Microsoft.SharePoint.Upgrade.SPIisWebSiteWssSequence
failed.
4. Error # 1 above was resolved by following the steps from this post: http://www.saintchad.org/sharepoint-psconfig-and-the-dreaded-concurrency-error. Executed this command: stsadm –o setproperty –propertyname command-line-upgrade-running –propertyvalue no
5. Re-ran psconfig command from step 2 above. This time, a new error showed up:
Application Resource Web Config for this IIS site (524709402) could not be found at (path)\wwwroot\wpresources\web.config.
6. It looks like the web.config file for this site is corrupt and needs to be re-created.
7. First, back up the IIS directory in question (including the web.config file).
8. Next, remove the IIS site using Central Admin: Central Admin > Web Application Management > Click on the web application > In the ribbon, click on the “Delete” button drop-down and select “Remove SharePoint from IIS website”. Select the appropriate site in the next dialog and make sure to select “Delete IIS websites”.
9. Re-extend the web application and re-create the IIS site. In CA Web Application management, click on the web application, then click on “Extend” button in the ribbon and fill out the appropriate fields. Click OK.
10. Make sure that the IIS site is accessible and working as expected.
11. Re-run the SharePoint Configuration Wizard (using GUI or command line psconfig).