Uncategorized

WebDAV

May 7, 2005

author:

WebDAV

Many customers of my File Manager Pro module have asked for the ability to edit documents directly (i.e. click on an edit icon in the file listing in their browser, then edit and save the document). This is easily done for text-based files, and indeed that capability is already implemented. However, for files that require a client-side application, this is not at all simple.

Let’s use Microsoft Word as an example. If you click on a Word doc link in your browser, by way of the mime type (or extension as a fall back), the browser is able to determine which application should be launched. It downloads the file to temp storage and then passes on the location to the app after launching it. Any changes made to this document are made to the copy in temp storage and have no bearing on the original file on the web server.

To facilitate the editing of documents on web servers, both server and client must support WebDAV (Web Distributed Authoring and Versioning), a protocol that extends HTTP by defining standards for web document authoring, versioning and publishing. IIS5 and IIS6 natively support WebDAV (although the capability is not on by default.). Windows XP and Mac OS X natively support the ability to map/mount a WebDAV collection as a virtual drive. All Office apps, most Adobe apps, and many other popular applications support the ability to transparently work with documents using the WebDAV protocol. So what’s the problem?

For servers on an Intranet, it is easy to enable WebDAV and create an easy to use shared document area. But then again, on an Intranet, why bother when you could have a shared drive. In a hosted scenario, WebDAV is much more difficult to implement due to the security concerns it poses. Currently, IIS does not provide a way to enable/disable WebDAV on a per web basis. So if a hosting provider were to enable WebDAV it would potentially compromise all websites on the server that were not properly secured. For this reason, WebDAV support in hosted scenarios is almost non-existent.

Also non-existent (as far as my Googling indicates), is a “server” API for a custom WebDAV implementation using ASP.Net. There are many client implementations, but if you want to be able to have WebDAV clients access a database-driven document repository, for example, you are on your own. This brings us back to File Manager Pro.

I was quite intrigued by everything WebDAV had to offer and so started doing some testing. I was pleased to find after a few hours of coding that it is possible to write a custom WebDAV server that works on ASP.Net. And so that is precisely what I am going to do. I am going to implement this as a generic API first and then use the API to add document authoring and versioning capabilities to File Manager Pro.

So far, I have tested getting a directory listing and editing a document. I have not implemented saving it, but I know it will work because my IIS logs show the request coming in with the right content.

This is quite exciting because it opens up File Manager Pro, and indeed DNN, to a whole new level of document collaboration. I am quite interested to see how this API may be used in different DNN modules in the future.

Founder NftyDreams; founder Decentology; co-founder DNN Software; educator; Open Source proponent; Microsoft MVP; tech geek; creative thinker; husband; dad. Personal blog: http://www.kalyani.com. Twitter: @techbubble
Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.