Unable to start the C2WTS

Summary

I recently worked on an issue were the “Claims to Windows Token Service” (C2WTS) was not starting and the typical solutions did not resolve the issue. Since the root cause was undocumented, I wanted to put this out there to help the next person that runs into this scenario.

Problem Description

Unable to start the “Claims to Windows Token Service”.

Windows Error:

Error 1053: The service did not respond to the start or control request in a timely fashion

SharePoint Error:

03/08/2022 09:10:20 6 ERR
Exception: System.InvalidOperationException: Cannot start service c2wts on computer ‘.’. —>
System.ComponentModel.Win32Exception: The service did not respond to the start or control request in a timely fashion

— End of inner exception stack trace —
at System.ServiceProcess.ServiceController.Start(String[] args)
at Microsoft.SharePoint.Win32.SPAdvApi32.StartService(String strServiceName)
at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Start()
at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Provision(Boolean start)
at Microsoft.SharePoint.Administration.Claims.SPWindowsTokenServiceInstance.Provision()
at Microsoft.SharePoint.Administration.SPServerRoleManager.<>c__DisplayClass1.b__0()
at Microsoft.SharePoint.Administration.SPServerRoleManager.ConfigureServiceInstance(SPServiceInstance serviceInstance)
at Microsoft.SharePoint.Administration.SPServerRoleManager.ConfigureServer(Boolean throwOnFailure)
at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo)
at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run()
at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Cause

In my case the issue was caused by incorrect settings in the “C:\Program Files\Windows Identity Foundation\v3.5\c2wtshost.exe.config”

Resolution

To resolve this issue, view the “C:\Program Files\Windows Identity Foundation\v3.5\c2wtshost.exe.config” and make sure the <startup> section contains a supported version of .Net.

Here the default settings:

<startup>
<supportedRuntime version=”v4.0″ />
<supportedRuntime version=”v2.0.50727″ />
</startup>

If your settings to not match the default setting shown above, update this file and try starting the service.

If it worked, I’m happy to have helped!

Leave a Reply