WebDAV (Web Distributed Authoring and Versioning) is an HTTP/1.1 protocol extension. WebDAV allows you to access files on a remote server and execute standard tasks including reading, writing, and deleting files. This protocol is typically used by users to collaborate on remote files. WebDAV is a web-based shared folder, to put it simply. On the client side, a WebDAV client must be installed in order to access WebDAV shares.
By default, there is no WebDAV client in Microsoft server operating systems. The WebDAV client, for example, is part of the Desktop-Experience feature in Windows Server 2008 R2, 2012/2012 R2. As a result, you must install this capability to access WebDAV resources from these OSs.
Windows Server 2016 has a separate WebDAV-Redirector component. To install it, run the following command (you will need to reboot the server):
Install-WindowsFeature WebDAV-Redirector –Restart
After the reboot, verify that you have the WebDAV-Redirector feature installed:
Get-WindowsFeature WebDAV-Redirector | Format-Table –Autosize
Two 2 new services will appear in the system:
- WebClient (get-service WebClient) — Enable Windows-based programs to create, access, and modify Internet-based files;
- MRxDAV (get-service MRxDAV) — File system driver (WebDav Client Redirector Driver).
When a trigger event happens, the WebClient service and the MRxDAV driver are disabled by default and configured to run in Manual mode. The service should have been launched when it was initially accessed through the driver MRXDAV.SYS, according to the developers’ plan, but it does not operate everywhere. As a result, we’ll make the service’s Automatic option mandatory.
Set-Service WebClient -StartupType Automatic Set-Service MRxDAV -StartupType Automatic
Start the services by running the following commands:
Start-Service WebClient Start-Service MRxDAV
The WebClient service is configured through the registry. All available settings are located in the registry key HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters.
From a practical point of view, the following parameters of the WebClient service may be of interest.
AcceptOfficeAndTahoeServers — Ability to connect to Web servers with SharePoint and Office Web Server (1 –by default);
BasicAuthLevel — The type of authentication used by the WebClient service. Available values:
2 or greater — Basic authentication enabled for SSL shares and non-SSL shares (Not safe, because the username and password are sent in plain text); 0 — Basic authentication disabled; 1 — Basic authentication enabled for SSL shares only (default value on Windows Server 2016); 2 or greater — Basic authentication enabled for SSL shares and non-SSL shares (Not safe, because the username and password are sent in plain text);
FileSizeLimitInBytes — the maximum file transfer size (in bytes) (by default 50 MB).
Let’s utilise the webdav-enabled share on live.sysinternals.com to test the operation of WebDav Client. Sysinternals’ popular sysadmin utilities are housed in this web directory.
The following are the methods for mounting a WebDAV drive on Windows Server 2016:
net use * \live.sysinternals.com
net use * \live.sysinternals.com@ssl
You can specify credentials to authenticate on a remote WebDav share:
net use * \live.sysinternals.com@ssl /user:solutionviews *
You can specify a specific TCP port:
To delete the connected WebDav drive, run the command:
net use * /del /y
In the event that you get System error 67. If you can’t find the network name after mounting the Webdav drive with explorer or cmd, try the steps following to fix it:
Check to see if the WebClient service is running;
Restart the machine after changing the value of the registry parameter BasicAuthLevel to 1