views:

4346

answers:

4

Does anybody know of an open source library written in C# that makes it easy to communicate with a WebDAV server?

For a project I need to communicate with a server using the WebDAV protocol. I'm using VS 2008 and the .NET framework 3.5. Using Google I found multiple samples written in C# on how to make a WebDAV request. It is simple enough but all the samples are creating there own WebDAV request from the ground up. I don't want to be bothered with all the syntactical details of building a valid WebDAV request.

On the web site of webdav.org I found a lot of links to software and libraries for all kinds of languages but nothing for .NET (C#). There is also an Apache project that looks very interesting (Jakarta Slide) but this project is retired and again... this is all java code. I know there are commercial libraries available that seem to do just what I need but I prefer an open source alternative if possible. However, if I can't find anything useful I might consider a commercial product so any recommendations are also welcome.

A: 

Webdav is HTTP based and deliberately simple. You can use any HTTP client to communicate with it. See here for examples.

Dave Hillier
Talking protocols is one thing, a first-class object interface is something completely different. I understood that he was asking for the latter.
tvanfosson
The issue is not so much as being able to handle a few WebDAV requests but rather to handle all the quirks of different server implementations.
Christoffer Soop
+2  A: 

Well as a 3rd party libraries go, you cant really go far without people recommending:

http://www.independentsoft.de/webdav/

Which looks good to me, when I was trying to figure out your problem a few years ago, I did a small post on my blog about it if you want to check it out, its nothing super special, but its got some good links at the bottom.

http://markmacumber.blogspot.com/2006/08/webdav-and-outlook-appointments-in-net.html

Mark
Seems to be a good *commercial* WebDAV alternative.
Christoffer Soop
A: 

This may or may not work for in your situation. In windows XP and vista you can mount the WebDav server as a file server. Then you can access it like any other file on the machine with normal file i/o. Of course, this isn't exactly open source (it''s more like no source) since you already have file i/o capability built into C#.

Google returns lots of examples http://www.google.ca/search?q=c%23+file+i%2Fo

I haven't really tried it out, but my experiences from trying to hook up WebDAV (web folders) in Windows XP with mod_dav in Apache, makes me think this is not the way to go.As far as I understand it there are many different WebDAV implementations in Windows, all with their different quirks both across Windows versions and within the same version.
Christoffer Soop
+1  A: 

I found myself in a similar position and a simple WebDAV communications class. It's pretty basic, but it might just contain enough functionality for most uses: http://kvdb.net/projects/webdav/