WebDAV in Windows x64

WebDAV in Windows 7 x64 can be very difficult to get working. What makes it more difficult is that there are very few error messages. Here are a few common mistakes, and the solutions:

  1. To connect to a webdav folder, type this into explorer’s address bar: \\[email protected]\
  2. Basic authentication only works over SSL. Otherwise, you will need to configure the webdav server to use digest authentication (negotiate authentication probably works, but I haven’t tested it).
  3. If Windows cannot verify the SSL certificate, it will refuse to connect. Furthermore, the error message is “Unknown Error”.
    For example, if you are using a free SSL certificate for CACert.org, then you must install the root certificate and/or the intermediate certificate, otherwise Windows won’t be able to verify the cert, and will report an “Unknown Error”. Same goes for self-signed certs.
  4. Proxy auto-detection slows things down. Untick “Automatically detect settings” in Internet Options.
  5. If windows sends the incorrect credentials, use the key manager to remove any invalid credentials: rundll32.exe keymgr.dll,KRShowKeyMgr. Unless your server uses kerberos or NTML authentication, then the credentials should be a “web site or program credential”, not a “Windows logon credential”.

Some Greasemonkey Scripts

These won’t be useful unless you happen to work for a specific employer at a specific site. Still, they show some examples of pre-populating web forms, which I guess some may find useful.

Agresso username script

// ==UserScript==
// @name           Agresso: Default username & client
// @namespace      https://bennettp123.com/
// 
// @description    Prepopulates the username and client fields (but
//                 not the password field) on the Agresso login page,
//                 and moves the keyboard focus to the password field.
//                 Tested on Firefox 5.0 and GreaseMonkey 0.9.6.
// 
// @include https://subdomain.redacted.com.au/Prodagr56/System/Login.aspx*
// ==/UserScript==
(
function()
{
    // constants
    var username = 'USER ID';
    var client = 'K1';
    // don't set the password field!

    // get the form elements...
    var userElem = document.getElementById('ctl00_name');
    var clientElem = document.getElementById('ctl00_client');
    var passwordElem = document.getElementById('ctl00_password');

    // ... and set the default values.
    userElem.value = username;
    clientElem.value = client;

    // set keyboard focus to the password field.
    window.addEventListener('load',
        function() {
            passwordElem.focus();
            passwordElem.select();
        }, true);
    }()
);

Outlook Web Access username script

// ==UserScript==
// @name           REDACTED: Default username & client
// @namespace      https://bennettp123.com/
//
// @description    Prepopulates the username and domain (but not
//                 the password field) on OWA login pages, and
//                 moves the keyboard focus to the password field. 
//                 Tested on Firefox 6.0.1 and GreaseMonkey 0.9.8.
//
// @include https://*.redacted.com.au/CookieAuth.dll?GetLogon*
// ==/UserScript==
(
function()
{
    window.addEventListener('load',
        function() {
            setTimeout(function() {
                // constants
                var username = 'insert_username_here';
                var domain = 'REDACTED';
                // don't set the password field!

                // get the form elements...
                var publicElement = document.getElementById('rdoPblc');
                var privateElement = document.getElementById('rdoPrvt');
                var userElem = document.getElementById('username');
                var passwordElem = document.getElementById('password');

                // ... and set the default values.
                publicElement.checked = false;
                privateElement.checked = true;
                userElem.value = domain + "\\" + username;

                // privateElement onclick() calls clkSec().
                // Since privateElement isn't actually. Therefore,
                // clkSec() is called manually.
                setTimeout("clkSec()",10);

                // set keyboard focus to the password field.
                passwordElem.focus();
                passwordElem.select();
            },100);
        }, true);
    }()
);