Webhost Failed To Process A Request Sharepoint 2010

If you are running SharePoint 2010 on Windows Server 2008 R2 RTM, installing MS13-004. WebHost failed to process a request. Sender Information: System.ServiceModel. When working with WCF 4.0 hosted in IIS 7.5 you may get following error: WebHost failed to process a request. Exception: System.ServiceModel.ServiceActivationException: The service '/Daenet.YourService.svc' cannot be activated due to an exception during compilation. The exception message is: The type ‘Daenet.YourService, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment.

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

Webhost failed to process a request. sharepoint 2010

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

Process

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.

Webhost

Solution

Webhost Failed To Process A Request. Sharepoint 2010

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.

09 Jan 2013 SharePoint 2010

If you are running SharePoint 2010 on Windows Server 2008 R2 RTM, installing MS13-004 (KB2756920) will break the Security Token Service with an error similar to the below:

KB2756920 removes the following two methods in System.ServiceModel.Activation.Iis7Helper:

The above exception calls out the top missing method. If you are running Windows Server 2008 R2 RTM, I would recommend upgrading to 2008 R2 SP1. If that is not possible, removing KB2756920 will also resolve this particular issue, but will leave the server open to the vulnerability resolved by MS13-004.

Webhost Failed To Process A Request Sharepoint 2010 Document

Update: Windows Server 2008 SP2 is also not affected by this issue.

Update 2: Installing KB2637518 on Windows Server 2008 R2 RTM looks to resolve the WCF issues with the Security Token Service.

Webhost Failed To Process A Request Sharepoint 2010 Email

Update 3: There is now a KB on this issue, KB2801728.

Webhost Failed To Process A Request Sharepoint 2010 Pdf

Trevor Seward is a Microsoft Office Apps and Services MVP who specializes in SharePoint Server administration, hybrid scenarios, and SharePoint Online. He has been working with SharePoint for 16 years from SharePoint 2003 on up, managing environments with terabytes of content for 150,000+ user organizations. Trevor is an author of Deploying SharePoint 2016 and Deploying SharePoint 2019. You can find him on Twitter and in /r/sharepoint.