Thursday, November 30, 2017

SharePoint 2010 - The type initializer for '' threw an exception


In Central Administration > Application Management > Manage web applications I received the following error:

The type initializer for '<Module>' threw an exception

Error

The corresponding ULS logs mention:

System.ArgumentException: Invalid token for impersonation - it cannot be duplicated.      at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)       at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info)       at System.AppDomain.get_Id()       at <CrtImplementationDetails>.DoCallBackInDefaultDomain(IntPtr function, Void* cookie)       at <CrtImplementationDetails>.DoCallBackInDefaultDomain(IntPtr , Void* )       at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* )       at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )

and

An SPRequest object was not disposed before the end of this thread.  To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it.  Due to flags specified at object creation, this will not be freed until processed by garbage collection.  Allocation Id: {49A40E83-3277-4578-A831-1276F291846B}  To determine where this object was allocated, set Microsoft.SharePoint.Administration.SPWebService.ContentService.CollectSPRequestAllocationCallStacks = true.

I performed an IIS reset using command prompt:

  1. Open command prompt as administrator;
  2. type: iisreset /noforce;
  3. retry loading the page.


No comments:

Post a Comment