I am getting an error while creating the configuration database in SharePoint 2010. It fails at step 3 with the following message.
Also attaching the error from event viewer
Failed to create the configuration database. An exception of type System.InvalidCastException was thrown. Additional exception information: Unable to cast object of type 'Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection' to type 'Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection'. System.InvalidCastException: Unable to cast object of type 'Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection' to type 'Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection'. at Microsoft.SharePoint.Administration.SPIisWebServiceSettings.ProvisionWebSiteSettings() at Microsoft.SharePoint.Administration.SPIisWebServiceInstance.Provision() at Microsoft.SharePoint.Administration.SPFarm.Join() at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb() at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()
Can someone help me?