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)
 
 
 
 
 
(6)
1,756 times
Add to favorites
1/31/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • 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...
  • Editing word documents
    8 Posts | Last post July 16, 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
  • 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.
  • Co-authoring is possible?
    2 Posts | Last post April 19, 2014
    • As I know, xlsx view/editing is possible through WOPI client.
      Does WOPI Host support co-authoring, simultaneous editing for xlsx documents?
      
    • Self answer - "Yes"
  • implement the CheckFileInfo and GetFile WOPI REST endpoints
    2 Posts | Last post April 17, 2014
    • office web app server(wac client) is not calling my WOPI host. What can I do?
      How can I activate CheckFileInfo and GetFile functions?
      I actually dont know how to implement the CheckFileInfo and GetFile WOPI REST endpoints.
    • you must set appWopiServer value the right wopi host address, which in web.config, appSetting section
1 - 10 of 19 Items