Pages

Thursday, January 24, 2013

Configuring Office Web Apps 2013 with SharePoint 2013

Here is my first blog in this year which I want to provide my hands on experience on how to configure Office Web Apps 2013 with SharePoint 2013 on Premises.

As we know that the Office Web Apps is now a separate product which allows users to view and optionally update office documents using a supported browsers. This not only works on desktop but also supported on mobile devices likes Windows Phones, iPhone and iPads too.

Office Web Apps 2013 comes with improved features and architecture which allows Office Web Apps to provide view capability for Exchange Server 2013 & Lync 2013. In blog post I will explain how we can install & configure the same for SharePoint 2013 on premises environment especially for the developers & SharePoint Administrators.

Here is how my existing SharePoint Farm which I use for development purpose and to simulate the QA/Prod environments:



In this blog I am assuming that the SharePoint farm is available to configure Office Web Apps (OWA). Here are the Simple 9 steps to configure the same:

Step-1: Preparing Server with Prerequisite Software

There are certain prerequisites for installing OWA and make sure the following prerequisites are installed on the server in our case it is VMServer21.


Step-2: Preparing Server with Prerequisite Configurations


There are certain features to be enabled for OWA installtion, we can enable that using following PowerShell script in the Windows PowerShell Command prompt. Make sure that the you are opening PowerShell prompt as administrator.

For Windows Server 2008 R2

Import the necessary module before by executing the following command:

Import-Module ServerManager

And then run the following command:

Add-WindowsFeature Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,
Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,
Web-Security,Web-Windows-Auth,Web-Filtering,Web-Stat-Compression,
Web-Dyn-Compression,Web-Mgmt-Console,Ink-Handwriting,IH-Ink-Support


For Windows Server 2012

Run the following command:

Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,
Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,
Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,
Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,
Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices

After completion of executing the command restart the machine.

Step-3: Installing Office Web Apps Server

Download Office Web App Server from Microsoft Download Center and you can extract the files from the image using any image extract softwares like MagicISO.

After extracting the files from the image, run Setup.exe.

Step-4: Installing Language Packs for Office Web Apps Server

Download necessary language packs from the Microsoft Download Center and run the WebAppsServerLP_en-us_x64.exe

Step-5: Creating Office Web Apps Server Farm

Planning Office Web Apps Server farm is very important based on how we are going to leverage, based on that we have to plan for load balancer, Number of servers, Certificates and so on. In this blog post we are going to see how to configure single server farm on HTTP.

Before configuring make sure that there no applications running on a default port as it is going to be used by OWA. To create a OWA single server farm execute the following PowerShell Command:

New-OfficeWebAppsFarm –InternalURL "http://vmserver21" –AllowHttp -EditingEnabled

Lets see what are these parameters means:

-InternalURL - is the name of the server that runs OWA, in our example it is vmserver21. In case of multiple server farm we have to provide the DNS configured in load balancer.

-AllowHttp - configures the farm to support HTTP.

-EditingEnabled - enables editing in office web apps especially when you want to edit the document from SharePoint.

Here is how it looks after running the command:



Step-6: Verifying Office Web Apps Server Farm

You can validate whether Office Web Apps Server Farm by executing the following URL:

http://vmserver21/hosting/discovery

and gives an xml output as shown below:


In case if you are not getting XML output as shown in the above picture and getting error related registering httpmodules, execute the following command to register ASP.Net framework 4.0 with IIS:

%systemroot%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -iru 
 

Following image shows the output of this command:



After completing this command don't forget to reset IIS by executing IISRESET command in the same command prompt.

With these steps we completed installing OWA 2013 and Configuring it successfully. Now lets see how to configure SharePoint to use OWA.

Step-7: Configuring SharePoint 2013 to use OWA

We can configure SharePoint to use OWA by executing following Powershell Commandlet in Central Admin Server:

New-SPWOPIBinding -ServerName vmserver21.global.com -AllowHTTP

Following screenshot shows the output of the commandlet:


Office Web Apps Server uses the concept of zones to determine which URL (internal or external) and which protocol (HTTP or HTTPS) to use when it communicates with the host, which in this case isSharePoint 2013. By default, SharePoint Server 2013 uses the internal-https zone. Verify that this is the current zone by running the following command:

Get-SPWOPIZone 

In case if the output shows other than internal-http as we are using http protocol to communicate with OWA Server, you can set it by executing the following commandlet:

Set-SPWOPIZone  "internal-http"

Step-8: Configuring SharePoint 2013 Security Token Service to allow OAuth Over HTTP protocol

To use Office Web Apps withSharePoint 2013 over HTTP in a test environment, you must set AllowOAuthOverHttp to True, Otherwise Office Web Apps will not work.

$config = (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp = $true
$config.Update()
 The output of these commands is as shown below:


Step-9:  Final Step is Testing OWA is Working as expected

The final step is to test the OWA is working as expected, in order to do this step open the existing site in a browser and upload couple of office documents and following image demonstrates the same:


You can test by clicking on the document which opens within the browser and don't forget to look at the URL as the SharePoint uses WOPI interface (/_layouts/15/WopiFrame.aspx) to render the document

With this we successfully completed the configuration of SharePoint 2013 to Use Office Web Apps.





1 comment:

Richard C. Lambert said...

Here is my first blog in this year which I want to provide my hands on experience on how to configure Office Web Apps 2013 with SharePoint 2013 on Premises. Hack Yahoo Email