I have implemented WebDAV server, and need to save the document after editing is completed, from temporary editing folder to Repository.
When Word is closed after editing, it calls http UNLOCK method and then I save it SaveFileToRepository(...).
The problem is that UNLOCK is also called when Word is opened and switched from Protected mode to Editing mode and then a new LOCK is created.
Two unlocks create two identical documents in Repository, what could be the solution?
Both UNLOCK requests are identical except Lock-Token key, I think it is not possible to tell which is last unlock.
One of my solutions is to add WebDAV url in
MS Word Options->Trust Center Settings->Trusted Locations-> check Allow Trusted Locations on my network and Add new location
which makes the document open in Editing mode. But is there any better solution?