WebDAV Server

If they were so inclined, they could impeach him because they don't like his necktie. -- Attorney General William Saxbe

WebDAV Server

Introduction

My WebDAV server was written to allow developers to easily integrate WebDAV support into software systems. It was written after surveying the existing free WebDAV servers and finding them all lacking. Most free WebDAV servers can only serve files on disk whereas I wanted to serve dynamic data, most present data as read-only whereas I wanted to be able to lock and edit it, and most are buggy and highly noncompliant with the standard.

A typical use case would be integrating Microsoft Office or Open Office into a web-based document management system so that users can click a link to open a document in Office via WebDAV and have it saved back into the DMS, transparently participating in any versioning, metadata extraction, and other features the DMS may have. Another case might be allowing a software system's data to be mapped to a drive so it can be edited using any program the user has. For example, consider a database table exposed through WebDAV. It might be exposed in multiple formats, such as .csv, .xlsx, etc. Editing any of these virtual files could transparently update the database, allowing easy database editing via any spreadsheet program, text editor, or perl script.

The server is in use by several companies and government organizations, so it's fairly useful and stable. It was originally written in 2012. In 2015, it was updated to the latest HTTP standards and the levels of polish and documentation were significantly improved.

Features

  • It serves arbitrary dynamic data and allows locking, editing, and storage of arbitrary (dead) properties.
  • It has good compliance with the WebDAV and HTTP standards in RFCs 4918, 4316, and 7230-7233.
  • It supports many optional and required but rarely implemented features, such as transparent compression, partial transfers, partial updates, locking, editing, dead properties, strong typing in property values, request preconditions, interservice copies and moves, and more.
  • It's extensible. You can add new services exposing arbitrary hierarchical data, add new resources to existing services, customize existing resources, alter the way requests are processed by existing services, customize the storage of locks and dead properties, extend the authentication mechanisms, and extend the set of supported HTTP methods.
  • It's generic enough that it can be used to serve general HTTP requests, not only WebDAV requests.
  • It's easy to use. It's built on ASP.NET so that it can be easily integrated into existing setups and used across platforms. If you just want to use the WebDAV server with a built-in service or a service developed by a third party, you need only add a few elements to your web.config file.
  • It has documentation and examples. Although more work could be done in this area, the existing documentation is quite decent.
  • The server comes with a reasonable degree of free support. Just contact me.
  • The server is Free Software, which means that you have the freedom to use, copy, distribute, change, and even sell the server, provided that you don't try to deny those same freedoms to others.

Usage

If you just want to use WebDAV to expose some files on disk, all you have to do is copy the DLLs and add a few lines to your web.config file. (See the Web.config.sample and Web.config.minimal files for documentation and examples.) If you want to add a custom data source, it's fairly straightforward. (See the services in the Examples directory, as well as FileSystemService.cs.) If you want help using, extending, or debugging it, feel free to contact me.

Download

Pre-built binaries: WebDAV.Server.zip (1.9MB) Release 7 - released March 31st, 2017
The latest source code can be obtained from here.