Security Token Service Application- Broken

Problem

Had an issue today on one of my developer’s VMs. The Security Token Service stopped working which caused several other service applications to fail, managed metadata service, bcs, secure store service, and more.

A quick browse through the event log showed the following errors logged:

Event 3 System.ServiceModel 3.0.0.0

WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/33711845 Exception: System.ServiceModel.ServiceActivationException: The service ‘/SecurityTokenServiceApplication/securitytoken.svc’ cannot be activated due to an exception during compilation.  The exception message is: Exception has been thrown by the target of an invocation.. —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: The farm is unavailable.

 

Event 8306 SharePoint Foundation

An exception occurred when trying to issue security token: The requested service, ‘http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas’ could not be activated. See the server’s diagnostic trace logs for more information..

Event 3 System.ServiceModel 3.0.0.0

WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/17653682 Exception: System.ServiceModel.ServiceActivationException: The service ‘/SecurityTokenServiceApplication/securitytoken.svc’ cannot be activated due to an exception during compilation.  The exception message is: Memory gates checking failed because the free memory (161902592 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.

Any attempt to try and configure/administrate any of the above mentioned service applications would result in an error.

Solution

Tried several solutions in an attempt to resolve the problem:

  1. Recreated the faulting service applications (secure store, bcs, etc), no luck.
  2. Restarted IIS
  3. Restarted the application server.
  4. Re-ran the farm configuration wizard (psconfig).
  5. Set the .NET Trust level on the the SharePoint Web Services IIS website to Full (internal).
  6. Reprovisioned the Security Token Service Application using Powershell (refer to http://blogs.msdn.com/b/sowmyancs/archive/2010/07/16/sharepoint-2010-service-applications-bcs-metadata-access-service-are-not-working.aspx on how to do this.

All of the above solutions did not work for me, although reported to work for others.

In the end, installing SharePoint 2010 Service Pack 1 resolved the problem completely.

Tags: , ,

Trackbacks/Pingbacks

  1. Share Point 2010 en Windows8 « Letras y Números - September 2, 2012

    […] http://www.mysharepointadventures.com/2011/07/security-token-service-application-broken/ […]

  2. An Exception Occurred When Trying To Issue Security Token | Best GE Home Security - October 11, 2015

    […] Security Token Service Application- Broken | My … – Problem. Had an issue today on one of my developer’s VMs. The Security Token Service stopped working which caused several other service applications to fail … […]

Leave a Reply

%d bloggers like this: