Reputation: 196
I have a set up the ITHit WebDAV server on our company website which works great on Office 2007/10/13 with PowerPoint, Word and Excel. However I have recently updated to Office 2016 and I have found that Excel no longer works, however Word and PowerPoint work OK.
In Excel I get the error message below:
In Word and PowerPoint I get the dialog below which I can skip:
Is there a known issue with the ITHit WebDAV server in Excel 2016?
There are no exceptions thrown when I'm attached in Visual Studio 2015. Also when I've checked Fiddler I can see the last thing the WebDAV server try to do is lock the document which is seems to do without any exceptions. It locked and unlocks the document twice then on the lock where I try to save it then comes back with the error message in Excel (see pic 1).
The lock requests are shown below:
The only think I can see that is different is a field in the Miscellaneous section of the header:
I've exhausted all options and I've got no idea why this is happening with just excel in office 2016.
Any help would be greatly appreciated.
Upvotes: 1
Views: 6505
Reputation: 46
I know this post is old, but for anyone who's having the same issue here's the solution:
This error is caused because Excel requests the file a second time if the user selects "Enable Editing". If the Server sends the file again (with code 200) instead of returning a 304 (Not Modified) Office seems to believe that somebody has changed the document even if this is not the case.
One quick solution is to use the ETag
header and validate the If-None-Match
in future requests to know what to return, whether 304 or 200.
Upvotes: 3
Reputation: 5894
I have double checked that MS Excel 2016 works with no problem with IT Hit WebDAV Server Engine. Here is what may cause this issue:
Incorrect Modified date property implementation. Make sure this property returns a correct UTC date.
Incorrect ETag implementation. Make sure to change this property every time the document is updated.
I have checked 2 server configurations: https://ajaxbrowser.com website (anonymous auth) running Server Engine v3.9.2075 and a sample server running on localhost generated by WebDAV wizards for Visual Studio v4.5.2958 with (Basic auth enabled in registry).
As a test client environment I used MS Office 2016 on Win 8.1 and MS Office 2013 on Win 10. In both cases excel document opened with no problem and I was able to save it back to server. The MS Office protected view options were set to default on the test machines - all checked.
Upvotes: 0
Reputation: 3844
This error has been around for a while and I found an old related Microsoft post:
Microsoft never came up with a solution, but a user named Berend Engelbrecht did post two workarounds. There was a code fix which did not work for me, but is worth trying. The assumption was that Excel incorrectly handled the modified date so don't bother returning it. This is how I implemented it for IT Hit WebDAV. Setting Modified to DateTime.MinValue in my implementation of IHierarchyItemAsync prevented the modified date from being added to the response.
if (context.Request.UserAgent != null &&
context.Request.UserAgent.IndexOf("Microsoft Office Excel", StringComparison.InvariantCultureIgnoreCase) >= 0)
{
Modified = DateTime.MinValue;
}
The second solution did work, but was not practical for our end users. Each would have to turn off Protected View for internet files: File > Options > Trust Center > Trust Center Settings > Protected View.
Also note that when debugging locally, I never hit the issue because my local WebDAV didn't trigger Protected View as an 'internet location'.
Hope one of these helps and if anyone finds a different solution please post it here.
Upvotes: 1