Windows

Setting up a WebDAV connection

  1. Open 'Computer' from your start menu or desktop
  2. Open the 'Map network drive' wizard
  3. Enter the full http:// address to your webdav installation

Note that you need to have the Web Client service enabled and running for Web Client to work. Some OS versions have it disabled, e.g. Windows Server 2003. Additional some optimisation instructions lead to it being disabled.

You can also map a drive on the command line by typing:

net use * http://example.org/dav/

Using Basic Auth

Basic Authentication is not supported on Windows by default, but you can turn it on using the registry:

It was also reported that in certain cases HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\BasicAuthLevel needs to be set to 2

Save the following to a .reg file and open it to simplify patching the registry:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters]
"UseBasicAuth"=dword:00000001
"BasicAuthLevel"=dword:00000002

Make sure you restart the 'WebClient' service afterwards. You can do this via Control Panel -> Performance And Maintanance -> Administrative Tools -> Services.

Issues

Windows clients have a wide range of technical issues, varying between versions. This page aims to categorize them all and show a list of windows versions where these issues have been confirmed.

The grid below has the following values:

Issue name Windows XP Windows Vista Windows 7 Windows 8 Windows 8.1 Windows 10
performance X ? ? ?
vistabug X
root-1 X X
root-2 X
ms-author X ? ? ? ? ?
whitespace X ?
getlastmodified X
charactersets X ?
locking X ?
filesize X X X ?
displayname X ? ? ? ? ?
auth X X X X X X
port X ? ? ? ? ?
sni X X X X ? ?
caching X X X X

performance

Windows 7 has a serious performance issue with WebDAV volumes. By default, accessing WebDAV volumes on Windows 7 is very slow.

The issue can be solved by unchecking "Automatic Detect Settings" in IE8 / Tools / Internet Options / Connections / LAN Settings.

See this article with further information.

vistabug

On Windows Vista, if you use the Web Folders client, you may need to install Software Update for Web Folders (KB907306) to avoid the following error: "The folder you entered does not appear to be valid".

root1

These older implementations require the WebDAV service to sit at the root of a domainname. There's no way you can connect to a url deeper in the WebDAV structure, because it will traverse every part of the path and make PROPFIND requests. So you have to make absolutely sure you have SabreDAV installed on a root url. If you are using apache, you can use mod_rewrite to map every single request to your WebDAV server, for example:

RewriteEngine On
RewriteRule ^/(.*)$ /server.php [L]

root2

Windows XP has even more quirks, and will treat the root of your WebDAV server as if it was connecting to an SMB server. You'll notice that when you're connecting, you will only see directories the root folder and they have icons similar to windows shared folders. You can only really perform operations within subdirectories on your root.

So:

make sure it is installed on the root of your domain, and make sure all operations happen within sub-directories of your share. The easiest way to do this is by simply creating a single top-level /dav/ directory.

ms-author

Windows XP requires the following HTTP header when making OPTIONS requests:

MS-Author-Via: DAV

whitespace

Windows XP does not like whitespace in xml body responses for PROPPATCH and PROPFIND. Make sure you send back the xml response with no whitespace at all. It took the author a very long time to figure this out.

getlastmodified

Windows XP requires a special format for the getlastmodified dav property in the propfind response. An example is:

<d:getlastmodified xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" b:dt="dateTime.rfc1123">Sat, 26 Apr 2008 18:00:18 -0400</d:getlastmodified>

This did no longer seem to be an issue with Windows XP SP3. Because this actually causes an incompatibility with MS Office, this is removed as per SabreDAV 1.7.4 and 1.8.2.

charactersets

Windows XP sends encoded characters in HTTP requests as ISO-8859-1. Possibly even CP-1252, but this has yet to be verified.

A converter for this purpose has been included since SabreDAV-1.2.0alpha1.

However, this currently only works for converting the HTTP requests coming from windows, and not yet responses to windows. Oddly enough, windows did seem to accept UTF-8 strings. Files could be opened, but not written to. This is probably only the case for UTF-8 filenames that don't cleanly map to ISO-8859-1. A workaround for this will probably not happen in the short-term.

These issues are verified on Windows XP SP3, but no testing has been done on Windows Vista or Windows 7.

locking

Normally windows unlocks files with the following header in the UNLOCK request:

Lock-Token: <opaquelocktoken:98b0726b-b34f-4778-9c35-da3927b6fe36>

For some reason however, it will specify it incorrectly.

Lock-Token: opaquelocktoken:98b0726b-b34f-4778-9c35-da3927b6fe36

Starting SabreDAV 1.4.3 there's a workaround for this behaviour.

filesize

Windows has introduced a file size limitation of 50000000 bytes in a security update.

You may receive one of the following error messages while downloading a file from a WebDAV volume:

The limitation can only be disabled on client side, by changing registry keys. See this article for detailed instructions. Additional information is also available in this kb article.

displayname

It was reported in earlier clients (XP at least, and perhaps Vista too) that sending back a displayname can cause the client to use the displayname instead of a url to access resources.

This will cause all kinds of bugs, so it's best to avoid {DAV:}displayname entirely. It was was reported that this bug was 'fixed' in Windows 7 by taking out support for {DAV:}displayname entirely.

auth

HTTP Digest is support across the board. HTTP Basic auth can be used directly from within IE, but will not work by default if you're using Web Client, unless WebDAV is used over SSL.

Basic auth can be enabled if the following registry change is made:

It was also reported that in certain cases HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\BasicAuthLevel needs to be set to 2

Save the following to a .reg file and open it to simplify patching the registry:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters]
"UseBasicAuth"=dword:00000001
"BasicAuthLevel"=dword:00000002

In some cases Windows will incorrectly prepend the NT domain to the username with two backslashes. Example:

MYDOMAIN\\username

The workaround for this is making the user go through all the login prompts (removing the NT domain), it will succeed after a while. It would also be possible to automatically detect and strip out these usernames but that could be problematic in relation to HTTP digest authentication.

port

It appears that Windows does not support ports other than the default (80). Make sure your server is not running on a non-default http port.

sni

It was reported that the Windows 7 and 8 (and likely older clients as well) do not support 'SNI' (server name identification), which is a technology that allows virtual hosting of multiple HTTPS domains on one server.

If you're running into issues with this, make sure you don't host more than one HTTPS-based domain off one ip address, or make sure that it's the default.

In the case of apache, the default https server would be the top-most virtualhost definition.

Furthermore it was reported that the WinHTTP API (used in the Windows WebDAV client) doesn't support TSLv1.1/TSLv1.2 connections. If you have restricted your server config to only provide TLSv1.1 and above the connection to your server will fail.

See this article with further information.

caching

It was reported that Windows 7 has a 60 second cache, which may be frustrating if you expect an immediate update.

This can be disabled using a registry key. See http://technet.microsoft.com/en-us/library/ee683963%28v=ws.10%29.aspx for more info.

upload timeouts

An upload of large files taking longer than 30 minutes using Web Client in Windows 7 can cause the following error:

See this kb article for detailed instructions how to raise the timeout.

Technical details

User agents:

Vista:
Microsoft-WebDAV-MiniRedir/6.0.6000

XP:
Microsoft-WebDAV-MiniRedir/5.1.2600
Microsoft Data Access Internet Publishing Provider DAV 1.1
Microsoft Data Access Internet Publishing Provider Cache Manager

Properties

Windows XP requests the following webdav properties when making requests:

Windows (XP and Vista) introduces the following properties under the urn:schemas-microsoft-com: xml namespace:

To easily take advantage of these properties, enable the propertystorage plugin.

Using Web Folders

Before Windows 7, Windows had a feature called 'Web folders'. This is a different WebDAV client with less features. This feature is removed in Windows 7.

To use it:

# Open up Internet Explorer # Press File, Open and fill in the full url # Check the "Open as Web Folder" setting # Press Ok


Comments