WOPI Host not called

2019-07-04 22:02发布

问题:

I would like to know why is my WOPI Host not being called. I launch my host through an HTML page similar to:

https://github.com/Microsoft/Office-Online-Test-Tools-and-Documentation/blob/master/samples/SampleHostPage.html

For the testing purposes I am handling just one file.

The discovery file I am using:

https://onenote.officeapps-df.live.com/hosting/discovery

Link for viewing word file:

<form id="office_form" name="office_form" target="office_frame"
  action="https://word-view.officeapps-df.live.com/wv/wordviewerframe.aspx?ui=nb-NO&rs=nb-NO&dchat=1&IsLicensedUser=1&WOPISrc=http%3A%2F%2F138.68.127.245%3A8082%2Fcontext%2Fwopi%2Ffiles%2Fxyz" method="post">
  <input name="access_token" value="something" type="hidden"/>
  <input name="access_token_ttl" value="0" type="hidden"/>
</form>

Any help appreciated! Of course my server is available at the time I am writing this.

回答1:

You have to be a member of the Office 365 Cloud Storage Partner Program to be able to use the MS discovery URLs and the WOPI clients in general. Your domain has to be added to the WOPI domain allow list (a list of trusted domains), this can only be done by Microsoft.

If you are not a member of that program, you can host a WOPI client on your own. You can choose between the Office Online Server 2016 and Office Web Apps 2013. Both are available through MSDN.



标签: ms-wopi