AJAX File Browser Authentication and SSL

The Ajax File Browser supports SSL as well as any authentication supported by a user agent. In many cases, you will rely on a user agent authentication mechanisms and do not need to care about authentication. By default, the user agent will present the login dialog when required, requesting for credentials. The user agent will keep the credentials and use it when necessary automatically.

If you would like to create your own custom login dialog you can set the credentials using SetCredentials method of WebDavSession object provided by each IT Hit AJAX File Browser instance:

var ajaxFileBrowserLoader = new ITHit.WebDAV.Client.AjaxFileBrowserLoader(settings);
ajaxFileBrowserLoader.oninit = function(ajaxFileBrowser) {
    // This event is fired when control is loaded and created.
    ajaxFileBrowser.GetSession().SetCredentials('User1', 'pwd'); 
    ajaxFileBrowser.SetSelectedFolder('/'); 
};
ajaxFileBrowserLoader.LoadAsync();

If you set the credentials via SetCredentials method the default browser login dialog will not popup. Do not specify the SelectedFolder in settings object (this will trigger the default web browser login before SetCredentials call). Call the SetSelectedFolder after SetCredentials instead.

Important! Internet Explorer and Microsoft Office on Windows 7 and Windows Vista by default require SSL connection for Basic authentication. Details about how to overcome this limitation could be found here.

Preauthentication in Google Chrome and Safari

In Google Chrome and Safari, you may experience a long delay before you will see the AJAX File Browser progress bar starts refreshing when your WebDAV server requires authentication. This delay is caused by preauthentication mechanisms used by the user agent. If preauthentication occurs the user agent will first submit the entire file to the server without authentication information and will get the 401 Unauthorized response. Only after that the user agent will submit the file content with authentication information and the AJAX File Browser will start refreshing progress bar.