Unable to Open PDF files Stored in SharePoint using Mobile Browsers

If you are getting an error on Mobile Browsers when trying to open PDF stored in SharePoint, that’s no more surprise as its been purposely disabled by Latest Office Web Apps 2013 Capabilities. This capability has been removed as of Office Web Apps October 2013 Cumulative Update.

clip_image001

That doesn’t mean you can’t open PDF files in mobile browsers at all. The default OWA action is to open PDF files in WordPDF Application. To overcome this behavior, we can remove the WordPDF binding from OWA and let it open by Ifilter as default. Run the following command in SharePoint Application server where you configured OWA WOPI Binding. This command will remove the WordPDF Application Binding from your SharePoint farm. This won’t harm any other applications such as Word, Excel or PPTX.

Get-SPWOPIBinding -Action “view” -Application “WordPDF”| Remove-SPWOPIBinding Removing the Binding for the WordPDF application will allow all the mobile devices to open PDF files from the browser normally without utilizing OWA WORD Application.

clip_image002

Advertisement

Word, PDF, PPT Cannot be Opened but Excel, OneNote | Resolving an Extremely Strange Behavior of Office Web Apps 2013

This Scenario is a brand new Office Web Apps 2013 (With SP1) Farm Configured with Two Nodes. Load Balanced with Windows NLB and Secured via SSL as HTTPS.

After all the Configuration on OWA Farm and WOPI binding on SharePoint, Excel Files Opens perfectly on browser but Word,Excel,PPT,PDF file types are fails with below Errors which is a strange behaviour.

1. OWA Servers are communicating Very Well across each other and Port 809, 810 can reachthrough Telnet.

2. No Issues on the SSL or Load Balancer because Excel is Perfectly Working (Excel Calculation Service not running in the farm at all).

3. SharePoint WOPI Binding doesnt seems to cause any issues because, again Excel is functioning Perfeclty.

clip_image001

Hanging up for more than 4 miniutes and Error Prompts

clip_image004

PowerPoint and PDF also the same. of cource the PDF Uses Word Viewer to Display Files on Broswer in 2013.

clip_image002

clip_image003

As same as the error on screen, Event Log had few errors too whenever the files were being tried to access but most of them did not give a spot on hint relates to this behaviour.

clip_image005

So Yes, Very Strange but Hold on, We are going to solve this !

After lot of Struggle, The reason was discovered and below are the steps taken.

Demoted Entire OWA Farm and Uninstalled the Product. then Reinstalled OWA in Each Server newly in C: Drive. The Issue was with the Additional Drive (D:) Which I used to locate Program files in OWA Servers which caused the issue.

All file types started working robustly right after the provisioning.

It is a Well-known practice that we normally follow on production environment to Isolate Program files, Logs etc… in to a Dedicated Drive as a best practive but with OWA it doesnt seems to be a good move yet !. Lets wait for a response from Microsoft and till then you better have your whole OWA Located to C Drive which is simple and hassle free.

The Bottom-line Is: WAC must be installed to the same drive letter as the render cache location.

<

p align=”justify”>You can Download my TechNet Whitepaper to Setup Office Web Apps 2013 in a Multi-server Environment with NLB and SSL here – https://gallery.technet.microsoft.com/Setting-up-Multi-Server-23e1f2ca

Setting up Load Balanced Office Web Apps 2013 Multi Server Farm with SSL (HTTPS)

It is hard to find a proper documentation on internet for this topic and that is where i thought of posting this article as i expirienced Office Web Apps 2013 Deployment in Production.

If you are not a browser fan, You can download PDF version of my Article from Microsoft Technet Gallery – https://gallery.technet.microsoft.com/Setting-up-Multi-Server-23e1f2ca 

Contents

1. Introduction

2. Server Environment

3. Requirements and Recommendations

4. Deployment

1. Introduction

Microsoft Office Web Apps 2013 is now a fully Isolated Far which supports multiple and various Integrations such as SharePoint, Lync, Skype for Business and other Third Party Applications. basically, your single Web Apps Farm will serve OWA Capabilities for Multiple applications so that is simple for you to manage and Integrate.

This Step by Step Guide will show you how to Setup an Office Web Apps 2013 Farm with High Availability and Security. The Naming and Certificates used in this scenario will be samples for demonstration purpose. You need to use meaningful names and obtain a valid SSL certificate for your scenario and environment.

This Guide will cover the following requirements.

  • Multi-Server Farm: Setup Office Web Apps with Microsoft NLB for High availability and Load balancing
  • Setup Office Web Apps Farm with Better Security using SSL for HTTPS. It is highly recommended to use HTTPS for Production Office Web Apps Deployments as HTTP meant only for developmental and testing environments only.

Before You begin with the Installation and Configurations, it is recommended to go through below references which may provide you all the basic information and knowledge about Microsoft’s Office Web Apps Server Product.

2. Server Environment

image

This Demo Setup will be using:

  • Two office Web Apps 2013 Servers with Windows NLB Enabled and Configured
  • SharePoint Server Farm with two WFE Servers and Single APP Server for Intranet Site Hosting with Host Header Site Collection (This SharePoint Farm is multitenant Environment where a Single Web Application shall contain multiple Host named Site Collections with unique URL)
  • Two Database Servers holds Always on Instance for SharePoint Environment.
  • Active Directory | DNS Server with Active Directory Certificate Service Enabled and Started
  • Two SQL Server Nodes with Always-on Instance hosts SharePoint Platform

Specifications of these servers are for Demonstration purpose only. Production Environments are highly recommended to meet Microsoft’s sizing requirements in order to get optimum performance and reliability.

clip_image002

3. Requirements and Recommendations

This guide uses windows NLB for demonstration purpose. In Production Environments, try to use a Hardware Load balancer which brings following capabilities if you are planning for more than one server for OWA.

  • Layer 7 routing
  • Enabling client affinity or front-end affinity
  • Enabling SSL offloading

Production Environments are always having firewalls in between different zones. Depends on the zone you are going to place OWA Servers; you need to open following ports in order to make OWA function properly.

  • Port 443 for HTTPS traffic
  • Port 80 for HTTP traffic
  • Port 809 for private traffic between the servers that run Office Web Apps Server (if you’re setting up a multi-server farm)

Topology Planning (Source: https://technet.microsoft.com/en-us/library/jj219435.aspx )

  • Plan for Server Level Redundancy. If You are using Virtual Machines to Host OWA, segregate them to separate Host Servers instead of Placing all in a one box (e.g. – OWA1 Hosted in Hardware Box A, OWA2 Hosted in Hardware Box B) so that if Hardware box A goes down in case, Yet the Box 2 Serves requests as OWA2 still runs there.
  • Stick to one data center. Servers in an Office Web Apps Server farm must be in the same data center. Don’t distribute them geographically. Generally, you need only one farm, unless you have security needs that require an isolated network that has its own Office Web Apps Server farm.
  • The closer the hosts, the better. The Office Web Apps Server farm doesn’t have to be in the same data center as the hosts it serves, but for heavy editing usage, we recommend you put the Office Web Apps Server farm as close to the hosts as possible. This is less important for organizations that use Office Web Apps primarily for viewing Office files.
  • Plan your connections. Connect all servers in the Office Web Apps Server farm only to one another. To connect them to a broader network, do so through a reverse proxy load balancer firewall.
  • Configure the firewall for HTTP or HTTPS requests. Make sure the firewall allows servers running Office Web Apps Server to initiate HTTP or HTTPS requests to hosts.
  • Plan for incoming and outgoing communications. In an Internet-facing deployment, route all outgoing communications through a NAT device. In a multi-server farm, handle all incoming communications with a load balancer.
  • Make sure all servers in the Office Web Apps Server farm are joined to a domain and are part of the same organizational unit (OU). Use the FarmOU parameter in the New-OfficeWebAppsFarm cmdlet to prevent other servers that are not in this OU from joining the farm.
  • Use Hypertext Transfer Protocol Secure (HTTPS) for all incoming requests.
  • If you have IPsec deployed in the network, use it to encrypt traffic among the servers.
  • Plan for Office features that use the Internet. If features such as clip art and translation services are needed, and the servers in the farm can’t initiate requests to the Internet, you’ll need to configure a proxy server for the Office Web Apps Server farm. This will allow HTTP requests to external sites.

Software Requirements for Office Web Apps

  • Office Web Apps Server/s Must Be Independent from other Applications and Services Such as SharePoint, Exchange, Lync, Skype4B. Do not try to deploy Office Web Apps on a sever which runs any of the above Applications and that is not supported.
  • Don’t Install Any Services or Applications depend on IIS 80, 443 or 809 Ports because OWA frequently removes web applications on these ports in order to bring up the OWA Web Applications.
  • Do Not Install any office Client applications on OWA Servers as it is not recommended to be. If any office Applications are installed on a server you are about to install OWA, you have to fully uninstall them prior to the OWA installation.
  • Do Not Install OWA on a Domain Controller or any Domain Server runs Critical Services such as DNS or AD DS.
  • Download the Office Web Apps 2013 with SP1 which is the latest version you can download. Also look for the recent Cumulative Updates prior r to go live in production scenarios.

4. Deployment

It is Assuming that you already have a SharePoint farm Prepared with an Accessible Site Collection. This guide will not go through the SharePoint Server Deployment but only the Integration of Office Web Apps for SharePoint in order to allow your end users to open/edit their Office Documents within the Browser.

Steps:

  • Installing Prerequisites in OWA servers for Office Web apps
  • reating DNS Host Records
  • Configuring Windows NLB for Load balancing and High Availability
  • Configuring SSL Certificates using Active Directory Certificate Services
  • Installing Office Web Apps
  • Configuring Office Web Apps Farm
  • Joining Member Servers to the Office Web Apps Farm
  • Integrating with SharePoint Farm
  • Testing Functionality

 

4.1. Installing Office Web Apps Prerequisites

You must have a Domain User account (Such as SharePoint Farm Account) created in order to Install Office Web Apps.

After Creating your Virtual Machine, Login to the same and Prepare it with necessary Network and Domain Configurations such as defining IP addresses and joining it to the respective domain.

Then Login in to the server using local administrative credentials and add the User Account created for Office Web Apps in to the Local Administrators Group.

Run the following Scripts in Windows PowerShell in order to prepare your OWA servers with Prerequisites. You can define the SXS path to source files if your server doesn’t have the internet connectivity by simply passing the -Source Parameter (e.g. -Source D:\Sources\sxs)

It might prompt for restarting once finished.

For Windows Server 2008 R2

Install Following Software’s

o Windows Server 2008 R2 Service Pack 1

o .NET Framework 4.5

o Windows PowerShell 3.0

o Platform update for Windows 7 SP1 and Windows Server 2008 R2 SP1 (KB2670838)

Right Click on Windows PowerShell and Run it as Administrator. Then run the following

Import-Module ServerManager

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,NET-Framework,NET-Framework-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-Win-CFAC

For Windows Server 2012

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,NET-Framework-Features,NET-Framework-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45

For Windows Server 2012 R2

Install – NET Framework 4.5.2

Then Run the following in PowerShell

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,NET-Framework-Features,NET-Framework-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45

4.2. Creating DNS Host Records

Next to create the HostA Record for NLB Cluster Name (Which will be the ultimate Server Name of OWA Farm).

Direct to your DNS Server and Simply Create a Host AAA Record points to your Target NLB IP. You need a dedicated IP V4 address for this.

Open Up the DNS Manager Console in your DNS Server and Right Click on the Respective Zone and hit New Host (A or AAAA) to create a new Host record.

clip_image001

Provide the Name and IP It points to (which is the desired NLB Cluster IP) and hit Add Host to create.

clip_image002[6]

Record is ready for you now.

4.3. Configuring Windows NLB

Then the next step is to Install Windows NLB for both OWA Servers in order to configure the Load balancing

Open up Server Manager and Click Add Roles and Features from the top. This has to be done in both OWA servers.

clip_image003

Just Click next on the first Screen

clip_image004

Leave the Default Selection here and hit Next

clip_image005

Default choice here too and hit Next to proceed

clip_image006

Select the Network Load Balancing from the Feature list and hit Next to Install the feature then restart the server if prompted.

clip_image007

That Installed NLB feature for us and now let’s Setup Load Balancing Cluster. Open up Windows NLB Console from the primary Machine (OWA1). Make sure both Nodes are now ready with IP, Host Names, NLB Feature.

clip_image008

Right Click on the top level and Create a New Cluster

clip_image009

Provide the Name or IP of the Primary Server which will host the Cluster (Local Server). It will automatically resolve the IP and display the interface for you. Simple hit Next to proceed.

clip_image010

Leave these settings as it is unless you need a specific configuration for IP and Network Interfaces

clip_image011

Next Step is to define the Cluster IP. At this scenario it will be 192.168.150.132

clip_image012

clip_image013

IP Address will be already selected and define the FQDN of the Cluster name here and choose Operation mode based on your network. This server only got a single Network Interface so it has to be Multicast. If you have Multiple Interfaces, you may choose Unicast Mode to make it function properly.

Hit Next to go ahead

clip_image014

clip_image015

You can edit the Port Rules to customize Ports or Protocols but not really necessary to get this function. Leaving the defaults will bring us what we need in this case.

clip_image016

If all went well, you can see the Cluster is created with the defined name and settings and Primary Host is added/Started with green health status.

clip_image018

Let’s go ahead and Add the second node here. Right Click on the Cluster Name and Add Host to Cluster

clip_image019

Type the Host Name or IP of your Secondary OWA Machine (OWA2 at this Case). Make sure it can communicate with the primary host and Windows Firewall Exceptions are added or Switched off so nothing will block the communication at this point.

If all good, it will resolve the IP over Name and Name over IP as below. Just Hit next to proceed.

clip_image020

Leave the Priority to Default (2) and State as Started

clip_image021

And then the Port Rules. Load Left as Equal and you can define if you need. Leave it as Default for better load Sharing.

clip_image022

Give it a moment

clip_image023

And Both nodes will come online and appear as Healthy if you have configured it properly.

clip_image025

To Verify the Availability of the Cluster, lets ping the Name. do it from one of the SharePoint Machine so you can identify any issues in the network.

clip_image026

So the NLB Cluster is All Set for us. Next is to Prepare the OWA Servers with SSL Certificates.

4.4. Configure SSL Certificates for OWA HTTPS

We are using Active Directory Certificate Service to Issue Web Server Certificates for our OWA Farm which will only be trusted and validated within the domain Network. For External Networks Such as Internet you need to purchase a Genuine SSL Certificate from a Third party vendor such as Verisign.

If you use Internal Certificates (Such as the one used in this scenario) your OWA WOPI URL will not be Valid for External Access and It Will Prompt the security Message with critical warning of content. So for Production environments, always use a valid Certificate.

Setting UP SSL

Open up Active Directory Certificate Services from your AD. At this point, our NORTHWIND AD will be the ultimate Certification Authority.

clip_image027

If you do not have this feature in your AD. You can Get it installed via Server manager Roles and Feature Installation Wizard.

clip_image028

This Server Already has it Installed so it’s just to go ahead. Expand the Server and hit Manage

clip_image029

Now the Certificate Templates Console will be Opened for you in Edit mode. Right Click on the Web Server Template and Direct to Properties.

clip_image031

Add the Computer Accounts (OWA1.Northwind.Int |OWA2.Northwind.Int) of your OWA Servers and the Service Account which will be using to setup OWA Farm for following Permissions. This will enable the Web Server Certificate Template to Enroll from these Two Servers.

Change Object types to following types.

clip_image032

clip_image033

Allow all three objects for Read and Enroll Permissions.

clip_image034

That’s all from the Active Directory Side. Let’s move back to the OWA Servers and Open up MMC.EXE to Obtain Certificates.

clip_image036

From the Console Root, Add/Remove Snap-In

clip_image037

Select Certificates

clip_image038

clip_image039

clip_image040

clip_image042

Expand the Certificates Root and Drill down to Personal. Right click on Personal and Request a New Certificate

clip_image044

New Certificate Enrolment Wizard will be prompted for you. Just Hit next to proceed

clip_image045

Active Directory Enrollment Policy will be selected by Default here so nothing much to do/ Hit Next here.

clip_image046

You will then see the Web Server Policy is highlighted with the Exclamation Mark. Click on the Message there.

clip_image047

That will bring you to the Certificate Properties where you will be providing all the details of this certificates. Select the Subject Name Type as “Common Name” and Alternative Name Type as “DNS”. Value for both of these field can be the same which is our OWA Farm Name. Basically this Certificate will be dedicated to the OWA Farm. It won’t validate any other purposes. Yet this may depend on your scenario and Environment.

clip_image048

Once Entered, Add them to the selection on the right side.

clip_image049

Direct to the General Tab and Provide the same Value for Friendly Name. Friendly name is the Name that you will use to recognize this Certificate at later time when you are pointing this Certificate from other Applications. Description Could be any.

Hit Apply to Complete

clip_image050

Then the Exclamation Message will be gone as you have successfully completed the Indexing of Information of the Certificate. Simply Check the Web Server Check box and Hit Enroll to obtain the Cert.

clip_image051

clip_image052

Give it a few seconds and If everything good, the certificate will be successfully enrolled. If you are getting an error here saying that “Server or Service Unavailable”, You might need to restart the Certificate Server Service at your AD Server.

clip_image053

We can now see the Certificate at the Certificate Store

clip_image055

Repeat the same for secondary OWA (OWA2) Server as well and then it completes our SSL Certificate Configuration Part.

4.5. Installing Office Web Apps Server 2013

Here Comes the real thing. As we have completed almost all the Prerequisites and Background Preparations for OWA Farm, we can proceed to the Installation and Farm Deployment.

Log in to the OWA Servers using the domain Account (Northwind\sp_farm_svc) you have crated. In this case it’s going to be the SharePoint Farm Account which will be used to Install OWA.

Map the Office Web Apps Server 2013 ISO (With Service pack 1) and Run it.

clip_image056

As Always, you have agree to the License terms and Continue to Proceed then.

clip_image058

The Success Message will be appeared in just Few Minutes If everything went well.

clip_image059

Now the Most Important Steps. Configuring the OWA farm is done through PowerShell. Best Tool for this is PowerShell ISE. From the OWA1 Right click on PowerShell Icon and Run ISE as Administrator

clip_image061

To Create the New OWA Farm. Run the Following Script. If you are using SSL Offloading the Parameters will be bit different.

New-OfficeWebAppsFarm -Verbose -InternalUrl https://OfficeApps.Northwind.int -CertificateName OfficeApps.Northwind.Int -ClipartEnabled -TranslationEnable -EditingEnabled

clip_image063

-Verbose (This Switch is to display the status)

-InternalUrl (This is the Internal Url referred from SharePoint Later)

-EditingEnabled (This will allow your users to Edit Documents in Browser itself)

-CertificateName (You can Define your SSL Cert using this Parameter. Or you can do it yourself manually via IIS Later)

-ExternalUrl (Can be Defined in addition to InternalUrl Swith if you are setting up an External Scenario)

If all went well, you will see the Result as above. And under the Machines it will show the OWA1 which is our Primary OWA Server in this farm.

clip_image064

Check the IIS to verify the Web Applications Creation and SSL Certificate Assignment

Open IIS manage and Check if These Two Web Applications are created

clip_image065

Note the Certificate Binding under the Site Bindings on the Right Panel and the Protocol is HTTPS.

clip_image066

 

4.6. Joining Secondary OWA machine to the Farm

Next step is to Join our Second Machine to the OWA Farm. Login to the OWA2 Machine using the same Domain credentials you used to Setup OWA1.

Open the PowerShell ISE as Administrator and run the Following from OWA2.

New-OfficeWebAppsMachine -MachineToJoin OWA1

-MachineToJoin (This switch is to Define your Primary OWA Server Name). basically this is the Master Machine.

clip_image067

That’s all from the OWA Farm Side. Next step is to Integrate OWA Farm to SharePoint but before that Let’s test our setup.

 

4.7. Testing the OWA farm

Simply try the Hosting Discovery URL from a Different Server (SharePoint Server Will do) https://officeapps.northwind.int/hosting/discovery

If you are Retrieving this XML Page as below with the parameters. It means you are all good to go.

clip_image069

Discovery URL working Means that your OWA Farm is accessible and Functioning well. so the next step is to Integrate OWA for SharePoint. Sometimes the Hosting URL may not work within the OWA Servers itself due to the loopback checking, best thing is you can check it outside the OWA Servers

The URL will not show any Warnings about the Certificate or Trust because it is valid internally within our Northind.Int Domain Environment. It will not be valid for Outside access unless it’s a valid External Certificate from a Vendor.

clip_image070

 

4.8. Integrate Office Web Apps with SharePoint 2013

SharePoint Environment is already done with a Host Named Site Collection which is also using HTTPS. This Scenario is fully setup for HTTPS in order to test the production level functionality. If you are using HTTPS for OWA Your SharePoint Site must use HTTPS too otherwise there is no point of using HTTPS on OWA.

Note: Recommended Way to Deploy OWA is Using HTTPS with a Valid SSL Certificate. HTTP is not recommended and it meant only for testing and Developmental Environments only.

In this scenario, we are using https://intranet.Northwind.Int Host header Site Collection for Integration testing. Below is the Default SharePoint Site which has some Sample documents uploaded and all good to go in SharePoint Side.

This SharePoint Farm also has two WFE Servers with NLB configured and this URL is fully load balanced with NLB.

clip_image072

Login to Your SharePoint APP Server and Run the Following in SharePoint Shell or PowerShell ISE.

From SharePoint Shell

New-SPWOPIBinding -Server OFFICEAPPS.NORTHWIND.INT

From PowerShell ISE

Add-PSSnapin Microsoft.SharePoint.Powershell -EA 0

New-SPWOPIBinding -Server OFFICEAPPS.NORTHWIND.INT

-Server (This parameter to Define Your OWA Farm Name. Not the Name of any OWA Machines)

clip_image074

If all Went well, you will see the above result. With defined Inputs such as Zone, Server Name etc…

That’s all from the SharePoint Fram side.

Let’s test out the functionalities from SharePoint Side now.

Note: Do not use Farm Account to test OWA. You must use a Different user account to test this as SharePoint Farm account is not allowed to open Documents from browser for security reasons.

Preview of a Document in Browser in WOPI Frame

clip_image075

Opening a Document

clip_image077

Editing a Document in Brower

clip_image079

4.9. Glossary

Server Did Not Respond – Error when Adding WOPI Zone in SharePoint – If you already have some other WOPI Zones this could happen, Or else Due to an Invalid Certificate on OWA Server.

Hosting/discovery Doesn’t Load – Mostly this happens if you try to open it from the OWA server itself. Try from another server. Also try to add the secondary Server and then load the URL.

Issue the Certificate for the Relevant Name – IF OWA1 (OWA1) or if OfficeApps.Northwind.int: Cert has to be for the same Name if it’s a SAN Cert.

To Test the availability across the Nodes, Shutdown one of the OWA Server and Check the Functionality. If you have completed above steps properly, OWA should work with the remaining node without any issue.

 

<

p align=”justify”>I will post another article on Troubleshooting OWA 2013 ……………………………………………….

"Sorry Something Went Wrong" Error When Opening a Document Using Office Web Apps 2013 Within SharePoint.

Got my Test farm Created with SharePoint and Office Web apps 2013 and was so excited to experience the Functionality. Uploaded a document to library and looked in to rendering but getting an Error saying that "Sorry Something Went Wrong" which is same when click preview and open up from browser.

clip_image001

All went well with the installation of Web apps but tried after restarting of Servers as well just to verify and still the same. Tried with few more documents and yet the same.

Since Microsoft has stated in several documentations that this can be occurred due to lack of memory and other allocated hardware, I checked that as well but my test server was having good enough resources as well.

So what ? When I dig in to the web found that we cannot use System Account for opening or editing document via Web apps. Tried to login using another account and it was start working perfectly.

clip_image002clip_image003

So you have to make sure on below criteria’s before you begin the Web Apps Installation

  • Verify that all SharePoint 2013 web applications use claims-based authentication. Office Web Apps rendering and editing will not work on SharePoint 2013 web applications that use classic mode authentication.
  • To enable users to edit (not just read) Office documents in a web browser, verify that you have the necessary editing licenses and that you have enabled editing on the Office Web Apps Server farm.
  • If you log into SharePoint 2013 by using the System Account, you will be unable to test the connection between SharePoint 2013 and Office Web Apps Server. You will have to log on by using a different account to test the connection.
  • Low memory conditions can cause Office document previews to fail in Office Web Apps. Verify that the server or servers that run Office Web Apps Server have sufficient memory by reviewing the Hardware requirements.

Note: There are more incidents that same kind of error can be occurred, refer here for more information which is well described – http://technet.microsoft.com/en-us/library/ff431687.aspx

Setup Office Web Apps 2013 For SharePoint 2013.

An Interesting thing that we are going to setup Office Web Apps 2013 for SharePoint 2013. as you know Office Web apps provides the capabilities of rendering, Opening, and rich editing of Microsoft office document formats such as Word, PowerPoint, Excel and One Note. By having Office web apps it just simplifies the rendering and editing of documents which are stored in SharePoint through Client browser therefore it’s not mandatory to have office client on client PCs.

Before we begin, make sure that you have an isolated server for Office web apps as 2013 version doesn’t support to install in a server running SharePoint and it has to be an isolated server.

Note:

Low Hardware (Such as Memory/Number of Processor Cores Minimum is two) can Cause interruptions on rendering and other Web apps Activities. So make sure that you have allocated better sized hardware based on number of concurrent users who will use web apps when you perform Production Deployments. This server I’m installing is just in a test lab which has 2 Gb of memory which is good enough for testing purpose.

Unlike Web Apps 2010, You cannot Experience the web apps 2013 functionality with the System Account as it’s not supported. you must always use another account for web apps  testing.

So Let’s Do this. As usual first to Install prerequisites.

For Windows Server 2008 R2

Windows Server 2008 R2 SP 1 – http://go.microsoft.com/fwlink/p/?LinkId=252370

.Net Framework 4.5 http://go.microsoft.com/fwlink/p/?LinkId=256560

Windows PowerShell 3.0 http://go.microsoft.com/fwlink/p/?LinkID=244693

KB 2592525  http://go.microsoft.com/fwlink/p/?LinkId=236954

Then Open up PowerShell as administrator, paste this portion and run

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

Give it a moment

clip_image001[4]

clip_image002[4]

You need to restart your server once you got above screen.

For Windows Server 2012/R2

Simply run below line by opening up powershell as administrator. And you are done on prerequisites installation.

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, InkAndHandwritingServices, Web-Net-Ext45, Web-Asp-Net45

Install Web Apps Server

Go ahead in Web Apps server, launch the Setup from your media.

clip_image003[4]

Accept the License Agreement and hit "Continue"

clip_image004[4]

Choose the path that you want to locate the program. And install

clip_image005[4]

Woof ! Error.

clip_image006[4]

As I stated above, you will get an error saying that ‘Microsoft Office Web apps Server 2013 encountered an error during setup" if your Server having only one Processor Core. Same thing happened to me and allocating two Virtual Processors for my Web Apps VM fixed the problem.

clip_image007[4]

This will take only few Minutes. A Coffee Time !

clip_image008[4]

If everything went well you will get below Screen.

clip_image009

Alright we got the product installed now. Let’s move ahead with configurations. First in Web Apps Server.

Customize below lines according to your environment and run it on PowerShell. To Pass the SSLOffloaded parameter is additional if requires for HTTPS Scenarios.

For HTTPS

New-OfficeWebAppsFarm -InternalUrl "https://APP3.northwind.int" -ExternalUrl "https://APP3.northwind.int" -SSLOffloaded –EditingEnabled

For me it’s just HTTP

New-OfficeWebAppsFarm –InternalURL "http://APP3.northwind.int" –AllowHttp -EditingEnabled

Since we need to enable editing, Key in "Y" and hit enter to proceed.

clip_image010

To Register our domain run the below line (we are still in Web Apps Server)

New-OfficeWebAppsHost -Domain northwind.int

clip_image011

Try to access the Discovery URL from web Apps Server – http://Servername.domain.int/hosting/discovery (

http://app3.northwind.int/hosting/discovery

)

It should open up below page for you.

clip_image012

With that we are completing of Web Apps Server. Now let’s move to SharePoint Server Side.

Configuring a SharePoint 2013 Farm for Office Web Apps

Log in to the SharePoint application server that hosts Central Administration and open the SharePoint 2013 Management Shell as an administrator. Next, enter the following line:

New-SPWOPIBinding -ServerName “Your Web Apps ServerName” -AllowHTTP

New-SPWOPIBinding -ServerName “app3.northwind.int” -AllowHTTP

It will Result as below

clip_image013

Now to Set the Zone Execute – Set-SPWopiZone –zone “internal-http” from SharePoint Server Shell

image

If you are using HTTP, you need to allow OAuth over HTTP by using the following commands:

$config = (get-spsecuritytokenserviceconfig)

$config.allowoauthoverhttp = $true

$config.update()

clip_image014

That’s all on the configurations. let’s upload document to a library and test the functionality.

clip_image001[6]clip_image002[6]

if you are getting below error, refer to my previous post here which describes the resolution.

image