Verify and Test Office Web Apps 2013

As a SharePoint Consultant, it’s kind of a given that we also wear the Office Web Apps guru hat too. However, this post isn’t specifically aimed at the SharePoint audience but rather the wider wearers of the Office Web Apps guru hat too. Most likely, that will include our friends in the Exchange and Lync practices too. I won’t delve too deep into the inner workings of Office Web Apps and will assume that you have a solid understanding of how it works already. For brevity, I will abbreviate Office Web Apps to OWA for the remainder of this post.

A typical and very fast way to verify WOPI is working is to simply navigate to the discovery URL, for example:

  • https://officewebapps/hosting/discovery

However, if you are diagnosing a fault on a Production system, the issue may manifest, for instance, on your SharePoint environment when someone is attempting to open a document in the browser. So how do we test generating a document rendering in the browser independently of our product that consumes WOPI? That is to say, how do we rule out (or in) SharePoint as the point of failure? For this second process, we need to enable the ability to use Online Viewers to view files from a URL or UNC path. You will need a blank Excel file (.XLSX). In fact any Office document will suffice, but I’m just using Excel in this example. Also, where I’ve been using the OWA hostname “officewebapps” in this post, you would need to replace that with your real OWA hostname (use the Get-OfficeWebAppsFarm cmdlet if you are unsure what your OWA URLs are).

  • Unless you have already changed it, the default configuration of the OpenFromURLEnabled is “False”. In order to circumvent the WOPI host however, we need this value set to “True”. So, open up PowerShell on any OWA server and execute the following cmdlet:
Set-OfficeWebAppsFarm –OpenFromURLEnabled
  • Now copy the blank Excel file to the same OWA server (ideally in a temporary directory like C:Test) and share the parent folder with Everyone, granting the Read permission level
  • Open a new Internet Explorer session and navigate to https://officewebapps/op/generate.aspx
  • In the “Enter the address of the document” field, type the UNC location of your blank Excel file, then click “Create Link”
  • Once the link has been generated, the quickest way to test is simply clicking the “Test this link” hyperlink

You could always create a blank document for each file type supported by OWA (Word, PowerPoint, Excel, etc) and upload them to a more permanent location and use these generated links to form part of your daily/weekly testing process. However, you might want to consider the implications of keeping the OpenFromURLEnabled property set to True.

Further Reading

Full information about the Set-OfficeWebAppsFarm cmdlet can be found on this TechNet article:

The full MS-WOPI definition can be found on this MSDN article:

About the author