IIS10.0 WebDav and MS Word Redirector on fast reopen a document
IIS10.0 WebDav opens an old - deleted MS Word Document
Hello,
We are running some Windows 2019 Server with AD Authentication, HTTPS with AD Certificate and SSO only for internal use. Everything is fine so far, except:
In case of editing and closing a single document and immediately fast reopen the same document with VBA, with no delay, we gets an "older" version of document.
For simulation - VBA pseudocode run twice
sFile = "https://Win2019WebDavS/WebDAV/AnyGUIDFile.docx"
getEtag sFile 'debug.print"826b943ddc42d91:0"
REM delete file if exists
Kill convertUri2Unc(sFile)
docNew As Word.Document
Set docNew = Documents.Add
docNew.Content.InsertAfter strSomeTextWithTimeStamp & vbCrLf
docNew.SaveAs2 sFile
docNew.Close
getEtag sFile 'debug.print W/"6180f496dc42d91:0"
sleep 100
REM Reload Document
Dim doc As Word.Document
Set doc = Documents.Open(sFile)
getEtag sFile 'debug.print "6180f496dc42d91:0"
Logfile:
The pseudocode deleted the old sFile (#7) with eTag 826b943ddc42d91 and word creates (save and close) a new document (#20,#22) with weak eTag 6180f496dc42d91 (The eTags will be retrieved from PROPFIND query not shon in log but in pseudocode debug.print).
Then comes sleep 100, which is to short. Now the sFile is opend by Word. Word (#26) sends a HEAD to IIS and get the old etag from the deleted file which does not exist anymore. We have the content of the old deleted file in word doucument.
In case of increasing the sleep-time between CLOSE and OPEN to 2000 milliseconds, all works fine.
Are there any workarounds?
Many thanks in advance.
Thomas