'Can't load office document using WOPI integration

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.



Solution 1:[1]

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?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nikolay