.NET Server

Visual Studio WebDAV Server Wizard Options

In this article

Visual Studio WebDAV Server Wizard Options

Using WebDAV Server Implementation Wizard you can add WebDAV support to your ASP.NET Web Site, ASP.NET Web Application, ASP.NET MVC 2, MVC 3 and MVC 4 Web Application. The Wizard enables WebDAV on the folder of your choice while keeping the rest of the website intact.

WebDAV Server Folder Step

On this step, you specify Url of your WebDAV server.

The Wizard will do the following:

  1. The entire path that you specify here will be created in your storage.
  2. The <location> element with path specified here will be added to your web.config file to configure your WebDAV location.
  3. The handler will be added on the site root to process OPTIONS and PROPFIND requests submitted by Microsoft Office and Windows Shell.
  4. In the case of MVC project, the Wizard will define a map for the path specified in this step.

It is recommended that your Web Site or Web Application to be located on the site root. Microsoft Office and Windows Shell (Mini-Redirector) may submit OPTIONS and PROPFIND requests to site the root and each subfolder in file path. For example, if your document is located at http://server/DAV/Folder/mydoc.docx, Microsoft Office submits OPTIONS and PROPFIND requests to the following URLs:
http://server/
http://server/DAV/
http://server/DAV/Folder 

If your server does not provide a response to these OPTIONS and PROPFIND requests Microsoft Office may open your document as read-only or will be unable to save the document directly to the server. You can find more information about how Microsoft Office opens documents from web here.

More about read-only Microsoft Office issue and how to resolve it could be found here.

You should not escape any characters in the URL field. If you wish to specify any special characters specify them as is. For example to specify 'My Folder' do not write 'My%20Folder', write 'My Folder' instead.

While IT Hit WebDAV Server Engine supports any characters in item names, some characters and folder names are not supported by WebDAV clients or require additional configuration in hosting environment.  For example Microsoft Windows Shell (Mini Redirector) does not support '%' in WebDAV item names, you cannot name your items as 'Some%Folder'. See more details about special folders configuration here. See how to enable special characters depending on your hosting environment here.

Storage Type Step

On this step, you specify where files and metadata (for example custom properties and locks) will be stored.

  • Live Interfaces Implementation Blank - only classes with empty interfaces implementations will be added to your project.
  • Store files and metadata in Microsoft SQL database - the Wizard will create Microsoft SQL Express database and all data including file content, locks and custom properties will be stored in it. You can select this option even if you do not have Microsoft SQL Express installed on your development computer. The Wizard will create an SQL script, that you can optionally use to create the database on your SQL Server instance.
  • Store files and metadata in file system - All data will be stored in file system. Your file system must be NTFS as locks and all custom properties will be stored in Alternative Data Streams with each file.
    • File storage location - the folder that will be available via WebDAV. If the folder does not exist it will be created. By default, this folder will be created in App_Data\WebDAV\Storage under your project folder.
  • Populate storage with sample data - The Wizard will add several files and folders to your storage.

Standard Features Step

On this step, you specify WebDAV features that your server will support.

  • Class 1. Class 1 server provides basic WebDAV support. On a Class 1 WebDAV server you can create, delete, copy, move files and folders as well create, update and delete custom properties. Your files will implement IFile interface, folders will implement IFolder interface. 
  • Class 2. In addition to the functionality provided by Class 1 server, Class 2 server allows hierarchy items locking. Items locking may help to prevent server items modification by other users. Most WebDAV Clients such as Microsoft Mini-Redirector, Mac OS X Finder and Microsoft Office require Class 2 server. In addition to Class 1 interfaces your files and folders will implement ILock interface. 
  • Quota. The WebDAV client application will be able to request available space and used space. Your folder items will implement IQuota interface. 
  • Access Control Layer (ACL). Create and manage users and groups, as well as define permissions on files and folders. 
  • DeltaV. DeltaV server provides the ability to check-out / check-in resources and keeps versions track.

Note that while in this documentation we refer to server classes as Class 1 and Class 2 the IT Hit WebDAV Server Engine V3 is RFC 4918 compatible and support Class 3.

 

Below are some WebDAV clients work with Class 1 server:

  • iPad Keynotes and Pages 
  • KDE Konqueror 
  • GNOME Nautilus

 

Here are some WebDAV clients that require Class 2 server:

  • Microsoft Windows Shell (mini-redirector / Add Network Place) 
  • Microsoft Office 2010, 2007, 2003 and XP 
  • Max OS X Finder (Darwin)

Extended Features Step

On this step, you select features that are not part of WebDAV standard, but often required to be implemented.

  • Microsoft Extensions for WebDAV support. Microsoft Mini-Redirector will be able to parse file system attributes and Windows Explorer will be able to display files as hidden, system, etc. As well as you will be able to manage file system attributes using Win 32 API for network shares and drives mounted using Mini-Redirector. The IMsItem interface will be implemented on all items. 
    • Mark files that start with "." as hidden. Such files are created by Mac OS X Finder, and usually must be hidden. If you check this option such files will be hidden in Windows Explorer.
  • Resumable upload support. Required if you wish to upload large files and manage long-lasting uploads. You will be able to pause / resume uploads, restore broken uploads, report upload progress and create upload progress bars. When you check this option: 
    1. Your file items will implement IResumableUpload and IUploadProgress interfaces. 
    2. ITHitPutUploadProgressAndResumeModule will be configured in web.config. 

      Note that to display upload progress in Ajax Browser in Internet Explorer you must check this option.

  • Create custom handler for GET verb. When user hits WebDAV folder in a web browser your WebDAV server will display a custom HTML page. On this page you can list folder content, show information about how to connect to server or place Ajax Browser.

Authentication Settings Step

On this step you will specify your WebDAV server authentication type.

While most websites are using some kind of cookies/Forms authentication, there is no any standard on this type of authentication and each website implements it in its own unique way. In turn most WebDAV clients utilize standard-compliant authentication such as Basic, Digest or Windows and does not support cookies/Forms authentication. To host both your website and WebDAV server on the same virtual host and within the same web application your application needs to support both types of authentication: it will utilize to ASP.NET Forms authentication when web browser is used and switch to Basic or Digest when WebDAV client is detected. Such configuration is known as Mixed Authentication and you can find more about it here. The IT Hit WebDAV Server Engine Wizard provides sample implementation of Mixed Authentication Disposition Module for Basic and Digest authentication.

  • Anonymous. All files and folders in your WebDAV location will be unprotected and anybody will be able to edit and browse files on the  WebDAV server. No authentication module will be added to the project. The rest of your website will continue using authentication specified in <authentication> element in web.config. In many cases you will use this for testing and demonstration purposes. Also use this option if you plan to implement Url-authentication or any other custom authentication. 
  • Basic. Basic authentication is supported by the majority of WebDAV clients.
    Important! Microsoft Windows Shell, Microsoft Office and Microsoft Internet Explorer require secure SSL connection. These clients will fail to connect to WebDAV resource with Basic authentication without SSL. To setup insecure non-SSL connection for testing purposes please see this article: http://support.microsoft.com/kb/2123563
    The Mixed Authentication module will be added to your website and will request Basic authentication only for non-web browser clients (that is for WebDAV clients). If your website is using ASP.NET Forms authentication it will continue using it for clients that access your website via web browser. In both cases credentials will be validated using your ASP.NET Membership provider. 
  • Digest. Digest authentication can be used both via secure and insecure connections. Some WebDAV clients such as Micfosoft WebFolders on Windows XP does not support Digest authentication. Digest is supported by Microsoft Office, Windows Shell on Windows 7, Windows Vista, Server 2008 and Mac OS X Finder. The Mixed Authentication module will be added to your website and will request Digest authentication only for non-web browser clients (that is for WebDAV clients). If your website is using ASP.NET Forms authentication it will continue using it for clients that access your website via web browser. In both cases credentials will be validated using your ASP.NET Membership provider.
    Digest authentication requires the ability to retrieve password from your credentials storage without a security question. Your ASP.NET Membership provider must store password as encrypted value or as clear text but not as hash. 
  • Windows. To use the Integrated Windows Authentication / Single Sign-On, your entire web application must be configured to use Windows authentication. User credentials will be validated against Windows or domain uses. If your server is hosted in IIS, depending on your IIS Authentication settings, Basic, Digest or Integrated Windows Authentication (NTLM or Kerberos) will be used. To activate Kerberos authentication your WebDAV server must run in IIS or as a Windows Service under Network Service or System account, otherwise NTLM will be used. Note that Visual Studio Development Server supports NTLM only.

If you are adding WebDAV support existing website and this option is disabled, change the authentication type in your web.config and in IIS to 'Windows' (or check NTLM checkbox in your project settings if you are using Visual Studio Development Server) and run the Wizard again. Alternatively you can use the Visual C# -> Web -> “ASP.NET WebDAV Server Application” wizard to create project with Windows authentication.

Visual Studio Start Action Step

On this step you specify what Visual Studio will do when you start your project.

  • Keep my current settings. Start Action options in your project will not be modified. 
  • Open WebDAV server folder in a default web browser. When Visual Studio starts the web browser will display content of the page returned by your custom GET handler.