Tagged: Integration Testing

Office Web Applications 2013: Errors pre-viewing all Office Documents

In process of building Disaster Recovery Solution for SharePoint 2013 we installed a DR SharePoint Farm (SP2013) and DR Office Web Application Servers Farm (WAC2013). In process of testing integration between SP2013 DR farm and WAC2013 DR Farm we received errors for all Office Web Apps services.

Word Web Apps error:  “Sorry, there was a problem and we can’t open this document.  If this happens again, try opening the document in Microsoft Word.”

OfficeWebAppsWordErrorProblemOpeningDocument

Excel Web Apps Error: “Excel Web App – Sorry, we’re having a problem showing this workbook”

OfficeWebAppsExcelErrorProblemOpeningDocument

Sifting ULS Log entry: “HttpRequestAsync (WOPICheckFile,WACSERVER), request failure [HttpResponseCode:Unauthorized, HttpResponseCodeDescription:Unauthorized, url:http://SP2013/sites/Workflows/_vti_bin/wopi.ashx/files/a457e9117c8d466faa75bcb4cf26149c?access_token=REDACTED_1056&access_token_ttl=1470880994483%5D”, followed by “Request http://SP2013/sites/Workflows/_vti_bin/wopi.ashx/files/a457e9117c8d466faa75bcb4cf26149c failed with 401 error but we will not retry. [file source: WACSERVER]”.

SharePoint2013_OfficeWebApps2013_DisasterRecovery_HighLevel

Disaster Recovery architecture diagram for SharePoint 2013 and Office Web Apps 2013

In our case we were accessing DR SP2013 farm and DR WAC2013 farm through local traffic managers load balancers (LLB) and the Primary Farms through Geographical load balancers (GLB). Both farms are configured to have both GLB and LLB URLs as alternative access mappings (AAM) with GLB URL set as a default.

The way Office Web Apps integration with SharePoint works is that when SharePoint create a request to Office Web Apps Server Farm it uses the Default AMM URL as a base for a link to the document that is being previewed. In our case it was using URL of GLB,  and as result was trying to access the primary farm to generate document preview. The 401 error was due to the fact that the user did not have authentication token to the primary farm.

Solution: the following steps need to be performed in DR SP 2013 and WAC 2013 farms for the time of integration testing the DR farm:

1.  SP2013DR farm have to be reconfigured to use the URL of LLB of the DR SharePoint farm as default AAM;

2. WAPI bindings on the DR SP 2013 farm needs to be reconfigured to use the URL of the LLB of the WAC2013DR Farm;

Remove-SPWOPIBinding -All:$true -confirm:$false
Get-SPWOPISuppressionSetting | Remove-SPWOPISuppressionSetting -confirm:$false
New-SPWOPIBinding -ServerName 'WAC2013DR' -confirm:$false
Set-SPWOPIZone –zone 'internal-https' -confirm:$false

3. DR Office Web Application Farm needs to be configured to use DR WAC 2013 farm URL of LLB as -InternalURL parameter;

Set-OfficeWebAppsFarm -InternalURL 'https://WAC2013DR' 

Those steps will need to be reversed to get farm ready for the Disaster Recovery situation.

 

That was another page in the Chronicles of SharePoint Bits, Happy scripting!