Thursday, June 23, 2016

SharePoint 2016 Products Configuration Wizard failed throwing ‘One or more types failed to load’

Environment: SharePoint 2016 Enterprise RTM, Windows Server 2012 R2
Scenario: Install SharePoint 2016 Enterprise RTM and configure
Issue: The SharePoint Products Configuration Wizard failed throwing ‘One or more types failed to load’
SharePoint Products Configuration Wizard failed
Troubleshooting:
  1. Looked into the configuration log file and noticed the following error message
Could not load file or assembly 'Microsoft.Data.OData, Version=5.6.0.0, Culture=neutral’
Could not load file or assembly 'Microsoft.Data.OData, Version=5.6.0.0, Culture=neutral’
  1. Download and Install the WCF Data Services Client for OData package and NuGet package Manager


  1. Use NuGet package manager to install the OData package


  1. Upgrade if you already have NuGet in your machine using following command


Nuget.exe update –self (This automatically get the update from web using your internet)
update NuGet
  1. The package can be installed from Visual Studio by navigating to Tools > NuGet Package Manager > Package Manager Console
NuGet Package Manager


  1. Make sure that you open a sample web project and execute the following command to install the package.
Install-package Microsoft.Data.OData
Install Package

  1. Run the configuration wizard again successfully

Tuesday, June 21, 2016

SharePoint 2016 Configuration Wizard failed with error ‘CacheHostInfo is null’.

Environment: SharePoint 2016 Enterprise RTM, Windows Server 2012 R2
Scenario: Install SharePoint RTM and run configuration wizard
Issue: The installation completed successfully however the SharePoint Products Configuration Wizard failed by throwing cacheHostInfo is null' error.
Configuration Wizard failed
Troubleshooting:
  1. Tried to repair distributed cache on the server by executing the following line of PowerShell script
Get-SPServiceInstance
$s = Get-SPServiceInstance <<Distributed Cache GUID>>
$s.delete()
Add-SPDistributedCacheServiceInstance
For some reasons, the script throws following error on line Add-SPDistributedCacheServiceInstance
Add-SPDistributedCacheServiceInstance : Could not load file or assembly 'Microsoft. ApplicationServer.Caching.Configuration, Version=1.0.0.0, culture=neutral, PublicKeyToken=31bf3856ad364e35'or one of its dependencies. The system cannot find the file specified.
Add Distributed Cache Service Instance
  1. Started AppFabric Caching Service and added the SPDistributedCacheServiceInstance successfully.

Add Distributed Cache Service Instance

  1. As running the configuration wizard again failed, downloaded and Installed Cumulative Update 7 (KB3092423) for Microsoft AppFabric 1.1 for Windows Server

  1. Restart the computer after applying this cumulative update package.

  1. After successfully installing the CU package. Execute the following PowerShell script to remove the caching service instance.
$SPFarm = Get-SPFarm
$cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString()
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}
$serviceInstance.Delete()

Remove the caching service instance.

  1. Run the Configuration Wizard again and the configuration is successful.

Configuration successful

References: 

Wednesday, June 8, 2016

Error occurred in deployment step 'Recycle IIS Application Pool': Remote SharePoint site connections are not supported.Parameter name: project


Using SharePoint 2013, Visual Studio 2012

Scenario: Deploy a farm solution from Visual Studio


Issue: Error occurred in deployment step 'Recycle IIS Application Pool': Remote SharePoint site connections are not supported.Parameter name: project


Cause: The Site URL was invalid and the Visual studio failed to deploy the solution 


Project Properties

Fix: Go to Project properties and update the correct SharePoint site URL and try to deploy the solution again.