Monday, December 5, 2011

How To Fix "IIS-Web Site “SharePoint Web Services” is missing / Event ID 8306 / Event ID 8011"

Issue
We had the following issue on several SharePoint 2010 farms: Users have reported that the Office Web Applications are not working anymore:

We've found several entries in the Event Log of the servers:

Event ID 8306: Could not connect to http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas. TCP error code 10061: No connection could be made because the target machine actively refused it ::1:32843.

There's also a corresponding entry in the ULS:

An exception occurred when trying to issue security token: Could not connect to http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas. TCP error code 10061: No connection could be made because the target machine actively refused it ::1:32843. .

Additionally we found the following Event Log-entries:

Event ID 8011: A Word or PowerPoint front end failed to communicate with backend machine http://sp:32843/4cc14f8d76084b14a40ac90540b7c094/Conversion.svc

In the ULS you can find:
A Word or PowerPoint front end failed to communicate with backend machine http://sp:32843/4cc14f8d76084b14a40ac90540b7c094/Conversion.svc

Fix
Usually your IIS Sites for SharePoint 2010 should look something like this:


You have a "SharePoint Web Services" IIS-Web Site having several Applications with nice Guid-names plus "SecurityTokenServiceApplication" and "Topology".

In our case the entire "SharePoint Web Services" IIS-Web Site was gone or on some servers the IIS-Web Site was still there, but the Applications were missing. On other servers we even had the case that everything was there, but it still doesn't work and we got strange error messages.


What we ended up doing was to recreate the "SharePoint Web Services" IIS-Web Site including all Applications.

We've used the following PowerShell-script to recreate the IIS-Web Site:

$Type = [System.Type]::GetType("Microsoft.SharePoint.Administration.SPIisWebServiceSettings, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

$Instance = $Type::Default

$Method = $Type.GetMethod("ProvisionLocal", "Instance, NonPublic", $null, @(), $null)

$Method.Invoke($Instance, $null)

$Method = $Type.GetMethod("Provision", "Instance, Public", $null, @(), $null)

$Method.Invoke($Instance, $null)

After executing the script your IIS should look like this:


The "SharePoint Web Services" IIS-Web Site including the Application Pool "SharePoint Web Services Root" was created, but no Applications for the SharePoint Service Applications.

To get the Service Applications registered, execute the following script:

Get-SPServiceApplication
ForEach-Object {$_.Provision()}

Your IIS should look something like this now:

This approach has solved our problems and everything was working as expected.

No comments:

Post a Comment