2

I am working on WOPI integration and I can't seem to find any workaround after an extensive research over stackoverflow.

I have implemented two endpoints in my API (.Net CORE 3.1). One is for CheckFileInfo and other is for GetFile.

I made my localhost public using ngrok. I have implemented a host page in angular which will render the iframe and load the open office document.

I am currently using the action url from test discovery XML file, provided in the official documentation at Microsoft.

When I try to open a word document using WOPI, the page gets stuck on loading only the word logo.

When tried with an excel file, I can see a blank workbook in my iframe with a prompt saying 'Couldn't open the workbook'. Same issue for PPT files too.

WOPI is not hitting my endpoint as well.

Am I missing out on any important step? Any help appreciated.

Eugene Astafiev
  • 34,483
  • 3
  • 16
  • 35

1 Answers1

0

Are you trying to use public office online server endpoints? These are only for registered partners (members of the cloud storage partner program). There is a "whitelist" of those, and only those are allowed to use Microsoft's public office online servers.

As far as I know, for mere mortals, there is only "on-premise" option of the office server for wopi integration. Means, you should have your own installation of the office online server.

As soon as you have that installed, there is a simple test page using which you can validate that wopi works (it is the homepage).

Am I missing something?

Nikolay
  • 8,647
  • 2
  • 23
  • 44
  • Thanks for answering @Nikolay. But I am not sure whether I need an instance of Office Online Server. Is it a mandatory thing? Right now I am trying to simply open a file in the iframe. I am using a local file to display in my webpage using Word. I have referred to such implementation [here](https://github.com/microsoft/Office-Online-Test-Tools-and-Documentation/blob/master/samples/SampleWopiHandler/SampleWopiHandler/WopiHandler.cs). – Khushbu Patel May 09 '22 at 17:28
  • For WOPI to work yes, it is a mandatory thing to have Office Online server. WOPI only works if you have it. But if you want to just show a word file, WOPI is not a way to go, there are many easier options, like google doc viewer or microsoft live viewer. Check out here: https://stackoverflow.com/questions/27957766/how-do-i-render-a-word-document-doc-docx-in-the-browser-using-javascript The problem here may be security, but it depends – Nikolay May 09 '22 at 18:02
  • For the moment I want to just view the files, but at a later stage I might want to allow editing and collaboration to my docs. However, I will try setting up OOS. Thanks! – Khushbu Patel May 10 '22 at 05:00