Building an Office Web Apps (OWA) WOPI Host

This solution gives you a simple WOPI Host that provides viewing, and editing through Office Web Apps via a custom WOPI Server. Illustrates the implementation of WOPI for a Server in a working example.

C# (2.7 MB)
 
 
 
 
 
(7)
2,542 times
Add to favorites
1/31/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Do we need to always provide SHA256 in get response for CheckFileinfo?
    1 Posts | Last post December 31, 2014
    • I am going through WOPI interface document which says SHA256 is optional attribute to be return as part of get file info.
      I just want to send it as empty string or hash of my file name because downloading file from my server take some time and one more thing get file info has been called multiple times and I don't want to put those stuff in my w3process carche?
  • Hello Shawn,Are there any plants to build an OWA WOPI Host by using Spring MVC?
    1 Posts | Last post December 03, 2014
    • Hello Shawn,Are there any plants to build an OWA WOPI Host by using Spring MVC?
  • Editing word documents
    9 Posts | Last post October 31, 2014
    • Hello Shawn, Are there any plans to update this sample project to support Word document editing? Thank you
    • Yes, just the schedule is "as time permits". So, no expectations on when.  I had hoped by Spring as I go through the detailed spec on cobalt http://msdn.microsoft.com/en-us/library/dd943623(v=office.12).aspx 
    • we so expect Word document editing
    • we so expect Word document editing ++1
    • First off thank you for providing this WOPI Host.
      
      Second, please add editing! :P
    • Shawn this is incredibly helpful; thanks very much!!
      Your post implies that to get Word editing working the host needs to support Cobalt, yes? Do you know of information out there on how to implement Word editing, or is this the wild west?
      Thanks!
      
    • Yes, Cobalt is MS-FSSHTTP. Which is referenced here: http://msdn.microsoft.com/en-us/library/dd943623(v=office.12).aspx
      
      The process I follow is:
      
      1. Read the MS-FSSHTTP spec - which unfortunately makes me fall asleep..
      2. See how SP 2013 interacts with OWA - for this, I run network traces using Network Analyzer (fka netmon) http://blogs.technet.com/b/messageanalyzer/
      3. Implement each "verb" or scenario as I go along.
      
      So, it's long and tedious.  Requires multiple machines as you can't have OWA and SP2013 on the same machine.
    • This a Wopi Host demo,With Cobalt(FSSHTTPB/D) support for Office Web Apps. 
      Support DOCX Editing, and also PPTX,XLSX.
      
      https://github.com/marx-yu/WopiHost
      
      Requires Microsoft.CobaltCore.dll
    • I'm working with Marx Yu's demo and that works great! Thanx Marx.
      But i'm having trouble to convert it to Web API. Did anybody succeed in doing this with ASP Web Api?
  • Special characters in file name
    2 Posts | Last post August 21, 2014
    • There are test files in demo in app_data folder - I am able to view those files rendered by OWA. 
      However, if I put into app_data folder file with special character ']' - "[AzureLab.docx]" for example, then demo creates url
      (its decoded value looks normal: 
      https://owa01.intek.com/wv/wordviewerframe.aspx?WOPISrc=http://testhost.intek.com/Intralinks.WopiHost/api/wopi/files/[AzureLab].docx&access_token=kl3ANR2/aUg=u5zivYTkdFvz5OI+Gr/0ScqCgqhUu/hllBpFfD21+u8=
      )
      but after clicking on produced url OWA shows standard errors message about problem with opening.
      Also - for regular files when I click on produced link, I can debug app - it hits breakpoint in 
      [Route("files/{name}/")] public CheckFileInfo GetFileInfo
      and with special chars in the name it does not hit breakpoint but OWA returns error right away.
      I guess produced access_token is not right (logic in KeyGen::GetHash ?), OWA cannot match it... - is that the reason why OWA does not call wopihost?
      
      Can you please advise on how to fix such issue.
      Thanks a lot.
      
    • I found how to convert in file name "[" ,"]" (double encoding), but for percent sign '%' it does not work...
  • cobalt and word editing
    2 Posts | Last post July 16, 2014
    • Hi
      I have been following these posts. 
      http: // stackoverflow.com / questions / 17065029 / can-i-just-use-office-web-apps-server
      And there is ample description of enabling word edits via Cobalt but no matter what I try it just will not enter edit mode.
      Has anyone else managed to pass this point and if so can I get some direction on what needs doing ?
      Roj
    • This a Wopi Host demo, With Cobalt(FSSHTTPB/D) support for Office Web Apps. 
      Support DOCX Editing, and also PPTX,XLSX.
      
      https://github.com/marx-yu/WopiHost
      
      Requires Microsoft.CobaltCore.dll
  • I cannot edit word files with the sample
    2 Posts | Last post June 25, 2014
    • Hi there
      For some reason I don't understand, the word part of the sample doesn't work with our Microsoft Web Apps 2013 Server installation. Excel and Powerpoint work like a charm however. I always get the message and then nothing further happes:
      "Dieses Dokument kann leider nicht zum Bearbeiten geöffnet werden".
      In english:
      "Unforunately this document cannot be opened in edit mode".
      
      I don't see any error or exception in any server logs, it simply doesn't work.
      Doesn't anyone have what the source of this problem might be?
      
      Best regards
      
    • I just realized that Word Editing is not part of the solution. Where do I start implementing this. I read the entire offical documentatio: http://download.microsoft.com/download/1/6/F/16F4E321-AA6B-4FA3-8AD3-E94C895A3C97/[MS-WOPI].pdf, yet I have absolutely no idea what I have to make different for editing word files, compared to excel and powerpoints. :-(
  • this wopi host suport connections external?
    2 Posts | Last post June 09, 2014
    • I have updated the connections and  occurred a warning:  
      
      This workbook contains external data or BI features that are not supported connections.
    • Hi,
      
      Is possible use this wopi host for BI with connections external?
  • Microsoft.CobaltCore
    1 Posts | Last post June 05, 2014
    • Hi
      I have been following several leads on getting word edits to run. I came across the Microsoft.CobaltCore reference.
      
      This seems promising. Are you on the same track with processing the payload ?
      
      
      var InwardMessagePayload = Request.Content.ReadAsStringAsync();
                      string InwardMessageString = InwardMessagePayload.Result;
                      System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
                      doc.LoadXml("<root>" + InwardMessageString + "</root>");
                      byte[] inwardStringAsByteArray = System.Convert.FromBase64String(doc.DocumentElement.InnerText);
                      Cobalt.AtomFromByteArray atomRequest = new Cobalt.AtomFromByteArray(inwardStringAsByteArray);
      
      
                      Cobalt.RequestBatch requestBatch = new Cobalt.RequestBatch();
                      requestBatch.DeserializeInputFromProtocol(atomRequest);
      
                      foreach (Cobalt.Request aRequest in requestBatch.Requests)
                      {
                          aRequest.ForceSetCompletedSuccessfully();
                      }
  • Can't Open a Excel With Sheet Protection
    1 Posts | Last post April 30, 2014
    • Hi,
      The sample works well in my environment, thanks a lot! But when I try to open a excel with sheet protection, I got the promt that the office web app can't open the sheet because some function is not supported. Is it possible to open a excel with protection in web browser?
  • Hosting OWA Azure and callback showing some errors
    3 Posts | Last post April 20, 2014
    • Hi,
       I installed OWA on Windows Azure VM and joined to a Domain (http://officeweb.smartcloudy.com/hosting/discovery)xml was loading correctly, for testing purpose I am using http protocol, and I am running my node.js app on my local machine(laptop) and made a http request to the OWA host, in result its showing the error ,please refer to link for screen short of the error "http://1drv.ms/1gU5Lc3" I don't know where the problem occurs. I am assuming that, I have to join my localmachine(laptop) to same domain to the OWA was joined so that I can access that host, is it right or wrong I don't know ?. I am stuck with this problem 
    • Hi, can you please test out link "http://officeweb.smartcloudy.com/hosting/discovery" with the code, I want to know whether it is configuration problem or not.
    • The WOPI host, your Node.Ks App, would need to accept requests direct from OWA. So, if OWA is in the cloud, and Node.js is running on premises then you have to have ports open or establish a VPN from your cloud service to your onsite node.js app.
1 - 10 of 21 Items