When a file needs to be unlocked on the WOPI server side after the file is locked for editing

Based on the WOPI protocol, as well as messages via the Internet, including the postoverflow post assembly of CobaltCore , we can do the editing on the Office Web App server for ppt / excel / word. One thing we are trying to understand more is lock / unlock. I did some testing for the excel file to understand lock and unlock. If we can figure it out for Excel, we will move on to the word file. Here are my findings:

  • when I started editing the excel file in the browser, the OWA server called the WOPI Http Lock request (x-wopi-override header as LOCK) to the WOPI server
  • after 2 minutes, the OWA server will automatically save what I edited by calling PutFile (x-wopi-override: PUT) on the WOPI server
  • When I close the browser tab, a request to invoke the Http unlock (x-wopi-override: UNLOCK) will appear on the WOPI server.

However, after step 2 above, if I just leave the idle view for more than 1 hour, in fact the OWA server will call RefreshLock (x-wopi-override: REFRESH_LOCK) every 15 minutes to update the same lock, although by default the lock should be expired after 30 minutes in a WOPI protocol document. At the same time, it will continue to block the file, and the WOPI server does not have the ability to release the lock.

I'm just wondering when we can release the lock on the WOPI server side in the case when the user is not working on the client side. We could not continue to block files for several hours (I don’t know the limit here, although we could get such a message when the session expired when viewing a SharePoint file in OWA after a very long time), this will prevent other users from editing the file. We have SupportsCoauth like false.

It's just interesting if anyone can shed some lights here about the behavior of Lock and Unlock and how we could prevent OWA from continuing to lock the file.

Note. I could not find a better tag for this, and there is no WOPI tag in SO, so I added the sames tags as the post assembly of CobaltCore

(16 ): , OWA, OWA . . , , , .

+4

All Articles