I was recently looking at a failed Office WebApps deployment to a SharePoint 2013 Farm. In this environment, all servers were running Windows Server 2008 R2 SP1.
- Upon executing the New-OfficeWebAppsMachine cmdlet, the Management Shell immediately returned an error:
- On initial observation, it looks like we have a serious problem but on closer insepection of the response exposes the “<h1>Server Error</h1>” message that looks like the beginings of a generic IIS 500 response. If we attempt to navigate to the WOPI discovery page, we can confirm that IIS seems to be the problematic component:
- There are numerous posts on the Internet about how to expand on IIS error pages so I won’t cover that here. What I will mention though, is a quick-win that might save you some time and configuration. Log onto a Office WebApp server and navigate to http://localhost. This time, we are receiving the full ISS error information:
- This error is quite common place when ASP.NET has not been correctly registered with IIS. In this scenario, .NET 4.5 was installed to the freshly built OSE as a pre-requisite for Office WebApps and all we need to do is complete the ASP.NET registration. Open PowerShell (or Command Prompt) and change the working directory to %windir%Microsoft.NETFrameworkv4.0.30319 and run aspnet_regiis.exe and ensure you pass the -ir parameter. Further reading for aspnet_regiis can be found here http://msdn.microsoft.com/en-us/library/k6h9cz8h(v=VS.100).aspx
- Now, when we try to refresh the WOPI discovery page we were hit with a blank page.
- That’s my bad! I forgot to perform an IIS reset on the Office Web Apps server after registering ASP.NET
- Refresh the WOPI discovery page again and we are now greeted with the XML we hoped for:
Transcript of errors below just for the benefit of search engines:
The content type text/html of the response message does not match the content type of the binding (application/soap+msbin1). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.
HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list