Thursday, November 5, 2015

SharePoint Configuration Error (An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Failed to call GetTypes on assembly Microsoft.Office.InfoPath.Server )

I have been facing this error when running the SharePoint Configuration Wizard, and was able to find a solution after googling for some time.

This error occurs when Office 2013 is installed with SharePoint 2010 and when you try to Configure SharePoint Central Administration.

Error:

Failed to create the configuration database. An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: 
Failed to call GetTypes on assembly Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, 
PublicKeyToken=71e9bce111e9429c. Could not load file or assembly 'Microsoft.Office.InfoPath, Version=15.0.0.0, 
Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
 Could not load file or assembly 'Microsoft.Office.InfoPath, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' 
or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'Microsoft.Office.InfoPath, 
Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find 
the file specified. Could not load file or assembly 'Microsoft.Office.InfoPath

The solution is to remove the below given folders from C:\Windows\assembly\GAC_MSIL (Check the "Important" section below)

1. Policy.14.0.Microsoft.Office.InfoPath
2. Policy.14.0.Microsoft.Office.InfoPath.Client.Internal.Host
3. Policy.14.0.Microsoft.Office.InfoPath.FormControl

Now re-run the Configuration Wizard!

Important:
You may not be able to access the this folder (C:\Windows\assembly\GAC_MSIL) directly. Check out my earlier blog post on how to access the GAC folder. Cheers!


Accessing the GAC folder structure using Windows Explorer

Many of us have accessed the Global Assembly Cache (GAC) for troubleshooting purposes. But when viewed using the Windows Explorer (C:\Windows\assembly), all the assemblies are rendered in a different way by the Operating System. This is not the actual physical structure of the GAC folder.


Try coping the same path and paste it on a browser (Chrome or Firefox) or access the path using command line, You might be surprised to see the real structure of the GAC folder. What you see in the Windows explorer is an aggregated view of the inner folders












To enable viewing the actual folder structure of the GAC from the windpows explorer, go to the Windows registry editor (regedit), create a string value key by the name "DisableCacheViewer" inside "HKEY_LOCAL_MACHINE\Software\Microsoft\Fusion" and set the value to "1". Now browse the same folder using windows explorer.


The earlier mentioned default nature of the GAC folder is achieved using the shell namespace extension. By using this, you can create custom functionality for windows explorer.