Weggo
Weggo

Reputation: 196

IT Hit WebDAV PowerPoint and Excel Unlocking before document opens

I have implemented the IT Hit WebDAV server on our company website. I've been looking at the logs and I can see it unlocks PowerPoint presentation twice. Once just before it open and then when you close MS PowerPoint.

Can I stop this from happening so when you open a PowerPoint document it unlock only when the document closes like MS Word.

When I open a Word document it only unlocks it once when you close the MS Word.

As you can see from the logs below there are less request in MS Word than in MS PowerPoint. Both documents I followed the same process:

  1. Open
  2. Edit
  3. Save
  4. Close

The reason why I would like it to unlock only once is so I can implement some custom code for security which should only run when the user has finished using the document.

Microsoft Word

[29] [OPTIONS] /DAV/

[45] [HEAD] /DAV/437f144e-c42a-4e8d-97b2-45fa3d1f0a71/Document.docx

[99] [OPTIONS] /DAV/

[79] [LOCK] /DAV/437f144e-c42a-4e8d-97b2-45fa3d1f0a71/Document.docx

[99] [GET] /DAV/437f144e-c42a-4e8d-97b2-45fa3d1f0a71/Document.docx

[54] [PROPFIND] /DAV/437f144e-c42a-4e8d-97b2-45fa3d1f0a71/Document.docx

[74] [LOCK] /DAV/437f144e-c42a-4e8d-97b2-45fa3d1f0a71/Document.docx

[94] [PUT] /DAV/437f144e-c42a-4e8d-97b2-45fa3d1f0a71/Document.docx

[94] [UNLOCK] /DAV/437f144e-c42a-4e8d-97b2-45fa3d1f0a71/Document.docx

PowerPoint

[89] [OPTIONS] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/

[86] [HEAD] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[89] [OPTIONS] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/

[86] [LOCK] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[89] [GET] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[97] [PROPFIND] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[65] [HEAD] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[68] [UNLOCK] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[97] [OPTIONS] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/

[86] [HEAD] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[97] [GET] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[100] [PROPFIND] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[68] [HEAD] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[86] [LOCK] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[89] [GET] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[68] [PROPFIND] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[97] [HEAD] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[59] [LOCK] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[59] [PUT] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

[86] [UNLOCK] /DAV/c763764d-3ba2-46f1-abee-07fa33241309/PowerPoint.pptx

Upvotes: 1

Views: 1007

Answers (1)

IT Hit WebDAV
IT Hit WebDAV

Reputation: 5894

I guess PowerPoint displayed the "Protected View" yellow ribbon on top with "Enable Editing" button, while Word - did not.

This is probably because your Word document was empty (0 bytes), while the PowerPoint - not.

Try the following and you will get 2 locks with Word file:

  1. Create the word file in your local file system, edit it and save, so it is not 0-bytes.
  2. Upload it to your WebDAV server.
  3. Open it for editting.

Another possible reason - you already opened Word document on this computer in the past (so the "Protected View" did not activate), while the PowerPoint document was opened for the firs time.

MS Office 2013 locks the document when it is being opened. In case it activates "Protected View" the document is unlocked immediately after opening. If you click "Enable Editing" the document is locked again. It is unlocked when the user closes document or when the lock token expires.

In general there should be no problem in multiple locking and unlocking the document, they always come in pairs, as in your log.

Please also note that locking is requested for limited period of time. In case the MS Office needs a longer lock it will prolong the lock, the server will call ILock.RefreshLock in this case.

Upvotes: 1

Related Questions