Getting Started with IT Hit WebDAV Server Engine

This article describes various WebDAV server types and compares its characteristics.

WebDAV Server Compliance

An important WebDAV server characteristic is WebDAV server compliance. Using WebDAV Server Engine you can create Class 1, Class 2 or DeltaV server. With a Class 1 server you will be able to create files, manage file structure copying, moving and deleting items as well as create, read and delete custom properties for each file or folder. Class 2 server in addition to the features provided by Class 1 server enables files locking. Locking helps to protect files from modifications by other users while editing file or managing structure. With DeltaV server, you can check-out / check-in items and track item versions.

Various WebDAV clients require different class of server compliance. For instance some clients like MS Office applications always lock files before modifications while others like iPad iWork applications does not. The table below lists minimum server requirements for some widely spread WebDAV clients:

WebDAV ClientWebDAV Server Requirements
Windows Shell on Windows 7 / Vista (Mini-Redirector) Class 2
Web Folders on Windows XP / 2003 / 2000 Class 1
MS Office 2010 / 2007 / 2003 / XP Class 2
Max OS X Class 2
iPad Keynote, Pages and Numbers Class 1
KDE Konqueror Class 1
GNOME Nautilus Class 1
DAVExplorer Class 1

 

Class 1 server implementation is usually simple and straightforward. Class 2 may require some additional affords for implementing locking interfaces and protecting items. The following articles describe how to create each type of server:

Creating Class 1 WebDAV Server
Creating Class 2 WebDAV Server
Creating DeltaV WebDAV Server

As a starting point of your WebDAV server project, you can use sample applications provided with IT Hit WebDAV Server engine. See the samples descriptions and how to setup them here: WebDAV Server Samples. The sample applications could be also useful for various servers’ features evaluation, testing WebDAV clients’ compliance and performance testing.

Hosting Environment

Another important question is to decide where to host your server.  IT Hit WebDAV Server Engine is independent of hosting environment. Usually, you can create your server based on ASP.NET HttpHandler and host it in IIS or you can create HttpLisener-based server. Both approaches have its advantages and disadvantages. The table below provides the comparison of these two types of servers:

 HttpListener-basedIIS / HttpHandler-based
IIS Not required IIS 5.1 / 6.0 / 7.0 / 7.5 required
Max upload file segment size Unlimited 2Gb
Max download file segment size Unlimited Unlimited
OS Windows 7 / 2008 / Vista / XP / 2003 Windows 7 / 2008 / Vista / XP / 2003 / 2000
Session / application state No Yes
Configuration Depends on implementation Requires wildcard configuration in IIS 5.1 / 6.0
Not supported characters in item names + None

 

The articles below describe steps specific to creating HttpHandler and configuring IIS:

Creating WebDAV HttpHandler
Configuring WebDAV Server in IIS

To avoid common pitfalls with large files upload to IIS / ASP.NET see Uploading Large Files to IIS / ASP.NET.

Uploading Large Files

The IT Hit WebDAV Server provides a reliable mechanism for uploading large files to WebDAV server. After implementing resumable upload interfaces, you will be able to effectively manage long-lasting uploads and upload files over 2 Gb to IIS/ASP.NET.

IIS / ASP.NET does not support upload of files over 2Gb by default. If you need to upload files over 2Gb to IIS in addition to implementing resumable upload interfaces you must upload file segment-by-segment. Note that you will need the WebDAV client that support PUT request with Content-Range header. The sample client implementation with resumable upload support is provided with IT Hit WebDAV Client API.

Performance

The performance of your WebDAV server depends greatly on the storage type used. Usually storing files in file system provides better performance than storing files in a database. Below you can see the performance comparison of SqlStorage and FileSystemListenerService samples that run on Pentium IV 1.8Gz:

WebDAV HTTP Method Files stored in the database
requests/sec
Files stored in file system
requests/sec
GET 64 146
HEAD 78 285
MKCOL 37 176
OPTIONS 149 333
PROPFIND, Depth 0 62 298
PROPFIND, Depth 1 5 102
PUT 33 108

Authentication

Your WebDAV server can utilize Basic, Digest, NTLM, Kerberos or any custom authentication schema. You can authenticate users against Windows/Active Directory or you can keep users’ credentials in any custom store. In your WebDAV server interfaces implementations, you can check permissions in any method prior to executing code and decide if a user has rights for calling specific method.

Various WebDAV clients may have specific requirements for authentication. For instance, most WebDAV clients do not handle Forms authentication implemented on many websites and document management systems directly. Read the article about authentication to decide how to build your authentication or integrate authentication with your existing CMS/DMS: WebDAV Server Authentication.

To find out what authentication schemes are supported by various WebDAV clients see Connecting to WebDAV Server.

 

See Also

Sample Servers