Monday, December 12, 2011

Mapping a Windows Drive to a WebDAV Server

Mapping a Windows Drive to a WebDAV Server

This tutorial shows you how to connect a Folder or a Windows Drive Letter to any WebDAV server, what to do if the command fails, what not to do, and security. This tutorial is for Windows XP/Vista/W7 client users.

The Two WebDAV Windows Clients

Microsoft Windows provides two WebDAV clients: Web Folders and WebDAV Mini Redirector. The clients are integrated and come preinstalled with your Windows.

Web Folders (XP only)

The first generation WebDAV client provided by Microsoft is called Web Folders and allows one to drag and drop between a remote WebDAV server and your local computer. The Web Folders client provides functionality similar to (secure) FTP.

How to connect (XP only):
  1. Go to My Network Places, and click on Add Network Place at the top of the left sidebar.
  2. The window that pops up is the Add Network Place Wizard. Click Next.
  3. On the next page, enter the URL of the WebDAV folder in the box named Internet or network address and click Next.
  4. A window asking for your username and password will pop up at this point. Enter your username and password, and click OK.
  5. On the next page, enter a name for this share -- this is the name that will show up in the My Network Places listing.
  6. Click Finish on the next page.

WebDAV Mini Redirector (XP, Vista, and Win7)

If you found us by searching on the internet, you should know that you may have a problem with your WebDAV server.

This tutorial gives you a few tips when it comes to using the Windows WebDAV clients with any server, but please consider switching to the BarracudaDrive WebDAV server -- you may just find that your problems go away. BarracudaDrive's integrated WebDAV server circumvents many of the problems typically associated with the native Windows WebDAV clients.

The BarracudaDrive WebDAV server can be installed on a wide variety of business/home computers, including online cloud servers.

The second generation Microsoft WebDAV client is called WebDAV Mini Redirector and allows one to map a WebDAV location to a Drive letter the same way as if you were using a Windows File Sharing/SMB/CIFSshare.

WebDAV Mini Redirector limitations:
  • No support for secure connections (HTTPS) on Windows XP. There is support on Windows 7, but it does not always work. It is inconsistent.
  • Your WebDAV server must be using port 80, the default port.
  • Typically fails when transfering larger files.
  • Gets confused if the user does not have access to read and/or write to a file or directory.
How to connect:
  1. Right click on My Computer and select Map Network Drive.
  2. In the Folder "entry field", enter the URL, and click Finish.
  3. Enter your username and password in the authentication box that appears.

Be sure to enter the correct username and password. WebDAV Mini Redirector may not take no for an answer and may continue attempting to login until the hacker prevention logic in BarracudaDrive bans your client's IP address. You will get an obscure error message in the console. You can see if you are banned by attempting to login using a browser.

The video to the right shows how to map a drive to the BarracudaDrive server by using a session URL. The session URL eliminates the login problem found in many Windows WebDAV implementations. Note: you do not have to use a session URL in BarracudaDrive. Simply use the same URL as you use in the browser when mapping the drive.

You can use the network drive like you use your C:\ hard drive as soon as the command completes successfully. This means that you can directly work with documents without first copying them, start computer programs, and more over the Internet.

The following image shows a Windows Explorer window listing the content of a WebDAV server.

windows mapped drive

Windows WebDAV Mini Redirector Authentication Bug:

Many Windows computers have a bug in the digest authentication process and thus authenticating using the above procedure will fail. You have the bug in your computer if the "Windows credentials dialogue" reappears after you have entered the correct username and password. It is possible to circumvent this bug by mapping the drive from the command line. Note, if the "Windows credentials dialogue" reappears, you must reboot your Windows computer before using the command line. Windows will continue to fail if you do not reboot. This is also true if you accidently enter the wrong credentials.

Do the following to map a drive and authenticate from the command line:

  1. Open a command window (DOS Window) by clicking the Windows start button and typing in the command "cmd" in the "run" or "search programs ..." box.
  2. Type the following command in the command window:
    NET USE * http://servername/fs/ password /USER:username

Note: the BarracudaDrive server includes functionality that circumvents the Windows authentication bug. The BarracudaDrive Web-File-Manager includes a WebDAV button that creates a session URL which uses the browser's login session. The session URL solves two problems: it eliminates the login problem and makes the connection more secure since you may terminate the session by logging out in the browser. If you do not use the session URL, the only way to logout is to reboot your Windows computer.


Security

One cannot use a secure connection when using the WebDAV Mini Redirector, i.e. the following command will typically fail:

NET USE * https://barracudaserver.com/dav/

When using WebDAV Mini Redirector, all data exchanged with the BarracudaDrive server is sent unencrypted and might be eavesdropped. Use one of the alternative clients mentioned above if you need secure communication.


What to do if the command fails

Error messages such as "The network name cannot be found" can be related to a number of problems. The first thing to do is to check if your Windows WebDAV client is disabled.

You can download and run the following command file, which will attempt to start the Windows WebDAV client.

You can alternatively enable the client manually:

Start the WebClient Service

Go to:
Control Panel -> Performance And Maintanance -> Administrative Tools -> Services
Scroll down until you see WebClient.

Enabling WebClient service

Set WebClient to automatic and start the service. Try to connect from a command window and restart Windows if it fails.

Things get a bit complicated if you have the same problem after enabling the WebClient service and after rebooting Windows. You may have to upgrade your WebDAV Mini Redirector Windows client.

You can do a search on Google and you will find many articles related to the WebDAV Mini Redirector problems. You can also see Wikipedia: WebDAV and Microsoft Windows.

Upgrading Windows Vista WebDAV client:

Microsoft has ackowledged there are Web Folder issues in Vista, but unless your system is 64-bit, you should be able to get Web Folders working by installing an update from Microsoft and using the instructions and "workarounds" in the following steps:

If you have a 32-bit Vista apply this Software Update for Web Folders (Microsoft.com).


What not to do when using the BarracudaDrive server

You might come up with the idea and connect to localhost, i.e. have the WebDAV Mini Redirector and BarracudaDrive on the same computer. There are no reasons to do this, except for testing.

Never do the following on a Windows computer if BarracudaDrive is running in console mode or if using the free BarracudaDrive version:

net use * http://localhost/dav/

The above command will lead to an endless loop between Windows and BarracudaDrive as BarracudaDrive will try to access the new WebDAV network drive, which loops back into BarracudaDrive. This command will crash your Windows computer.

However, the following command is OK:

net use * http://localhost/dav/C/

No comments:

Post a Comment