Thursday, October 4, 2012

Installing Office Web Apps Server for SharePoint 2013


Check out the whole SharePoint 2013 Solution Series
New Titles Added Weekly!

I wanted to evaluate Office Web Apps Server in SharePoint 2013 so I could see what the document previews would look like and understand the overall editing functionality. Therefore, I hijacked one of my staging servers and decided to install Office Web Apps Server. The server you choose can't have SharePoint running on it or any web application running on port 80. Also, Microsoft Office (or any Office component) cannot be installed.

The OS on my server was Windows Server 2008 R2 so I had to follow those directions. For Windows Server 2008 R2 you need to have the following:

  • Windows Server 2008 R2 Service Pack 1 and all required updates

  • .NET Framework 4.5 RC

  • Windows PowerShell 3.0

  • KB2592525

  •  
    Apparently this server did not have PowerShell 3.0 or the KB2592525 patch. So I needed to download and install those items first.
     
    Then I needed to run add the proper roles using the following in PowerShell:
     
    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
    
    
     
     
    I noticed in the output as shown in the image, that a restart was needed. So I did not even take a chance and rebooted the server.
     
    Next it was time to install the Office Web Apps Server. I just searched for the product and found the download:
     
     

     
    

    I downloaded the package and ran the installation - pretty straightforward.

     
     
    Next it was time to create the new Office Web Apps Farm on the server via PowerShell. Since this was for evaluation purposes, I used the test environment configuration:
     
    Import-Module OfficeWebApps
    New-OfficeWebAppsFarm –InternalURL http://servername –AllowHttp -EditingEnabled
    
     
     
     
     Since I enabled editing, I needed to confirm the operation:
     

    The operation resulting with all of the properties being displayed:


    The next step was to test the Office Web Apps server using a browser to confirm that http://servername/hosting/discovery produced a wopi-discovery response. It did:

     
     
     
    So that was it on the Office Web Apps server side. Now I needed to switch the the SharePoint 2013 server and do some magic there.
     
    
    
    Create the new binding:
    New-SPWOPIBinding -ServerName <WacServerName> -AllowHTTP




    Set the zone:
    Set-SPWopiZone –zone “internal-http”

    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()




    I didn't need to do this previously but while I was setting up my production server, I ran into an OWA issue. The answer was to run the above commands which I found in a forum who received the information from here.


    That's it! Bring up a document library with Office documents:




    Search for Office documents: (may need to perform a full crawl before the preview kicks in)


    This was very easy to install and implement! I was very suprised it worked the first time. It took a bit for everything to warm up and work but I really did not have to do much fiddling!

    45 comments:

    1. Hi Steven,

      Thanks for this great article. I'm having troubles while binding the office web app server with SharePoint server. Whenever I run New-SPWOPIBinding command, it comes up with an error..the server did not respond. I've tried it with -allowhttp parameter as well and still getting the same error. Any suggestions would be great help. Thanks

      ReplyDelete
      Replies
      1. Can you ping your Office Web Apps server from one of the SharePoint boxes? Just to confirm, you installed Office Web Apps on a different server that doesn't have SharePoint, correct?

        Delete
    2. Thanks for the reply Steven.
      I'm now one step ahead, I managed to bind the two servers by restarting my office web app server. Now I can preview documents from the office web app server but still no luck with SharePoint Server. I still can't ping office web app server from the SharePoint Server. I don't know what the problem is now.
      Thanks

      ReplyDelete
    3. Thanks for the quick reply.
      I've installed office web apps server on a different server. I've managed to bind the two servers by restarting the office web app server. The problem now is I can preview documents in the office web app server but not in the SharePoint server. I still can't ping office web app server from the SharePoint server and I don't understand why.

      ReplyDelete
    4. Windows firewall was turned on so it is pinging now after turning it off.

      ReplyDelete
    5. Windows firewall was turned on but it is pinging now after turning it off

      ReplyDelete
    6. Thanx a lot Steve...

      It worked for me too. Its very nice and helpful article.
      I have one question - When I search word document and open it on search page, it opens the document in word client app. But when I open the same document from library, it opens it in Web App. While Excel files are always opened in Web App.
      Why so in case of word documents ?

      ReplyDelete
      Replies
      1. Check your WOPI Bindings and make sure the Open is enabled for Word. Get-SPWOPIBinding from the SharePoint 2013 Management Console.

        Delete
    7. Hi Steve,

      Nice article.

      Do we definitely need seperate Office web app server for document preview in Sharepoint 2013 ?

      Regards
      Mani

      ReplyDelete
      Replies
      1. Yes. It can't run on a server that is running SharePoint.

        Delete
    8. Thanks Steve,

      How do you configure this if you want to edit files in the same farm from both internal networked machines and an external secure portal? Say, office..net
      and office.externalnetwork>.com
      I also assume you would have to expose a SSL interface on the Office Web App server on the external firewall.

      Regards,

      Paul.

      ReplyDelete
      Replies
      1. You need to set the zone to "external". When you setup the OWA farm you provide both the internal and external URL. I am not sure about the SSL and firewall. You would think you would need to expose it but it may just work through the external SharePoint bindings. I don't have an external environment to test.

        Delete
      2. http://technet.microsoft.com/en-us/library/jj219455.aspx#singleHTTPS

        Delete
    9. Hi Steve,

      re. above - I finally got this to work - but there are a lot of "gochas". You do need to provide both urls. If your internal SharePoint url is http then you will need to allow oauth as above, and use the -allowhttp switch.
      Also you will need a certificate with a SAN (Subject Alternative Name) - basically an alternative host name for internal use. This means you can use the cert on both internal and external interfaces. This is probably necessary because if you supply both external and internal urls for the office web farm the wopi binding (get-spwopibinding on the sharepoint server) will be automatically set to external-https. As you said, you need to set the matching zone (set-spwopizone) to https-external.
      It is also possible to get this working without similar internal and external domain names. The Microsoft documentation tends to use contoso.com for both domains - but you can use yourdomain.com and somethingelse.internal equally well.
      In addition you need to add trusted host domains to the owa farm using new-officewebappshost-domain . In our environment I had to use the EXACT host header of the Web Application or I got errors from the owa document display page.

      Hope this helps any further enquiries,

      Thanks

      Paul.

      ReplyDelete
      Replies
      1. Awesome! Thanks for the update! I appreciate it.

        Delete
    10. getting server not responding warning when trying to create a new spwopibinding with htttp. It used to work earlier but when we tried to remove the binding and add it again, for some reason it doesnt work.We tried pinging the server from application server and everything is fine. Not sure why it is unable to bind.

      Any ideas are highly appreciated.
      Thanks

      ReplyDelete
      Replies
      1. Did you try restarting the Office Web Apps server?

        Delete
    11. Thanks for the reply. Yes, we restarted both the web apps server in the farm.

      ReplyDelete
      Replies
      1. For the Apps Server:
        Make sure that http://servername/hosting/discovery still produces output.
        Insure that the World Wide Web Publishing service is started.
        IIS - Make sure the sites are started and running

        Delete
      2. On the SharePoint server, re-issue the OAuth:

        $config = (Get-SPSecurityTokenServiceConfig)
        $config.AllowOAuthOverHttp = $true
        $config.Update()

        Delete
      3. Thanks Steve,
        discovery still produces output.
        Will try the rest and let you know.

        Delete
    12. Hi, we follow these steps but we are having an issue. It says Sorry Something went wrong, we are not using the System Account to login. What can be the problem? Did you guys know?

      ReplyDelete
      Replies
      1. Are you using http or https? If http, did you run the PowerShell commands to allow oAuth?

        Delete
      2. I am having the same problem, the preview comes up, but in the preview window it says something went wrong. Was there an answer to this?

        Delete
      3. Same questions - Are you using http or https? If http, did you run the PowerShell commands to allow oAuth?

        Delete
      4. HTTP and Yes I did

        Delete
    13. Thank You, Great!

      Rockie

      ReplyDelete
    14. Hi, I get this error in this step New-SPWOPIBinding -ServerName “Your Web Apps ServerName” -AllowHTTP

      PS C:\Users\administrator.SEWSMX> New-SPWOPIBinding -ServerName OfficeWebApps.se
      wsus.com.mx -AllowHTTP
      New-SPWOPIBinding : Sorry, we have encountered an error and New-SPWOPIBinding
      has failed.
      At line:1 char:1
      + New-SPWOPIBinding -ServerName OfficeWebApps.sewsus.com.mx -AllowHTTP
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (Microsoft.Share…tNewWOPIBinding
      :SPCmdletNewWOPIBinding) [New-SPWOPIBinding], SPCmdletException
      + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewWOPIB
      inding

      ReplyDelete
    15. Make sure you can ping OfficeWebApps.sewsus.com.mx. Were you able to get to the wopi discovery?

      ReplyDelete
      Replies
      1. yes i can, the firewall is off in the two servers, in the server of OWA i test with the discovery and show the XML perfect, in my server of Sharepoint i have a project server too, do you know what is the problem?

        Delete
      2. Can you hit the discovery from the SharePoint server as well as a local browser?

        Delete
      3. Try the binding with the actual server name not the dns name

        Delete
      4. yes I can hit the discovery from my SharePoint server and is successful, now i try with only the name of server but nothing :(

        Delete
      5. When you performed the New-OfficeWebAppsFarm did you use the servername or dns name? If you used the dns, try using the servername.

        Delete
      6. Did you get it working Ivan?

        Delete
      7. hi, i found the error, in my configuration of internet explorer have the proxy active, the solution is easy, dont have a proxy or configure the proxy server to permission acces, thank you for you help steve.

        Delete
      8. Hi, i have a same issue , my internet explorer dont have proxy. Please help!

        Delete
    16. when i come to this step to test the Office Web Apps server using a browser to confirm that http://sp2013/hosting/discover to produced a wopi-discovery response. ..... Page not found come .. please help.

      ReplyDelete
      Replies
      1. Is sp2013 your Office Web Apps server? Looks like the SharePoint server to me.

        Delete
    17. I had to add
      $config.AllowMetadataOverHttp = $true

      in addition to

      $config.AllowOAuthOverHttp = $true

      for mine to work properly, so just wanted to share that.

      ReplyDelete
    18. Can you install Workflow Manager 1.0 on a Office Web app server instance?

      ReplyDelete
      Replies
      1. The OWS server uses IIS heavily. OWS needs a dedicated server without anything else running on it. I would think there would be conflicts if you attempted to run WF Manager on the same server.

        Delete
    19. Hi Steve,

      Good article! Just want to confirm that you only need to do the binding on the Application server that hosts Central Administration and not the other application servers in the Sharepoint 2013 farm. Is this correct.

      Thanks

      Shana

      ReplyDelete
      Replies
      1. Yes you only need to run it once on the farm. Doesn't matter which server.

        Delete

    Matched Content