<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Custom WebDAV Server Using .NET</title>
	<atom:link href="http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/</link>
	<description>Musings of a software developer in Milwaukee, WI.</description>
	<pubDate>Tue, 06 Jan 2009 02:23:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: gokul</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-13697</link>
		<dc:creator>gokul</dc:creator>
		<pubDate>Mon, 11 Aug 2008 10:35:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-13697</guid>
		<description>hi i downloaded from the following site http://sourceforge.net/projects/webdav
this one is maintaining the filesystem only
in that i want with sql database also 
hi anybody developed the webdav with sql backend database share the coding
with me</description>
		<content:encoded><![CDATA[<p>hi i downloaded from the following site <a href="http://sourceforge.net/projects/webdav" rel="nofollow">http://sourceforge.net/projects/webdav</a><br />
this one is maintaining the filesystem only<br />
in that i want with sql database also<br />
hi anybody developed the webdav with sql backend database share the coding<br />
with me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gprakash</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-13696</link>
		<dc:creator>gprakash</dc:creator>
		<pubDate>Mon, 11 Aug 2008 10:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-13696</guid>
		<description>hi anybody developed the webdav with sql backend database share the coding 
 with me</description>
		<content:encoded><![CDATA[<p>hi anybody developed the webdav with sql backend database share the coding<br />
 with me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-11136</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 22 Jan 2008 20:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-11136</guid>
		<description>Is it possible to download your WebDAV server?</description>
		<content:encoded><![CDATA[<p>Is it possible to download your WebDAV server?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geetha</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-11115</link>
		<dc:creator>geetha</dc:creator>
		<pubDate>Mon, 07 Jan 2008 06:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-11115</guid>
		<description>hi all,could somebody help me sending an OPTIONS request to a webdav server from a client.</description>
		<content:encoded><![CDATA[<p>hi all,could somebody help me sending an OPTIONS request to a webdav server from a client.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Germinal Ibarrola</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-10995</link>
		<dc:creator>Germinal Ibarrola</dc:creator>
		<pubDate>Thu, 11 Oct 2007 15:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-10995</guid>
		<description>Guys,

After a long hiatus, I'm back on the project... the code has been upgraded to VS 2005 

https://sourceforge.net/projects/webdav/

Comments and suggestions welcome!

Germinal</description>
		<content:encoded><![CDATA[<p>Guys,</p>
<p>After a long hiatus, I&#8217;m back on the project&#8230; the code has been upgraded to VS 2005 </p>
<p><a href="https://sourceforge.net/projects/webdav/" rel="nofollow">https://sourceforge.net/projects/webdav/</a></p>
<p>Comments and suggestions welcome!</p>
<p>Germinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Surendran</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-10960</link>
		<dc:creator>Surendran</dc:creator>
		<pubDate>Sat, 15 Sep 2007 09:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-10960</guid>
		<description>Hi

I want to send documents generated  by a buisiness process to different clients by FTP over SSL. That applicaion is working fine. But a few of the clients do not have FTP server but using secure HTTP (WebDAV). I need to copy files from folders on local drive or IIS virtual folders to remote web site folders.

The code I found on MSDN is for copying files from one folder to another on the same web site.  In my case I need to copy it either from a local folder or virtual folder in localhost. In the MSDN code I couldn't figure out a way of providing different credential for accessing resources from localhost and remote host.
Can someone help me to fix the code. Or can someone suggest a different way of doing it in .NET?

[STAThread]
      static void Main(string[] args)
      {
         System.Net.HttpWebRequest Request;
         System.Net.WebResponse Response;
         System.Net.CredentialCache MyCredentialCache;
         string strSourceURI = "http://localhost/Extracts/Client1/test.csv";
         string strDestURI = "https://200.150.100.50/Uploads/test.csv";
         string strUserName = "UserName";
         string strPassword = "password";
         string strDomain = "Domain";

         try
         {
            // Create a new CredentialCache object and fill it with the network
            // credentials required to access the server.
            MyCredentialCache = new System.Net.CredentialCache();
            MyCredentialCache.Add( new System.Uri(strSourceURI),
               "NTLM",
               new System.Net.NetworkCredential(strUserName, strPassword, strDomain)
               );

            // Create the HttpWebRequest object.
            Request = (System.Net.HttpWebRequest)HttpWebRequest.Create(strSourceURI);

            // Add the network credentials to the request.
            Request.Credentials = MyCredentialCache;

            // Specify the COPY method.
            Request.Method = "COPY";

            // Specify the destination URI.
            Request.Headers.Add("Destination", strDestURI);

            // Specify that if a resource already exists at the
            // destination URI, it will not be overwritten.  The
            // server would return a 412 Precondition Failed status code.
            Request.Headers.Add("Overwrite", "F");

            // Send the COPY method request.
            Response = (System.Net.HttpWebResponse)Request.GetResponse();

            // Close the HttpWebResponse object.
            Response.Close();

            Console.WriteLine("Item successfully copied.");

         }
         catch(Exception ex)
         {
            // Catch any exceptions. Any error codes from the COPY
            // method request on the server will be caught here, also.
            Console.WriteLine(ex.Message);
         }
      }
   }

Many thanks.</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I want to send documents generated  by a buisiness process to different clients by FTP over SSL. That applicaion is working fine. But a few of the clients do not have FTP server but using secure HTTP (WebDAV). I need to copy files from folders on local drive or IIS virtual folders to remote web site folders.</p>
<p>The code I found on MSDN is for copying files from one folder to another on the same web site.  In my case I need to copy it either from a local folder or virtual folder in localhost. In the MSDN code I couldn&#8217;t figure out a way of providing different credential for accessing resources from localhost and remote host.<br />
Can someone help me to fix the code. Or can someone suggest a different way of doing it in .NET?</p>
<p>[STAThread]<br />
      static void Main(string[] args)<br />
      {<br />
         System.Net.HttpWebRequest Request;<br />
         System.Net.WebResponse Response;<br />
         System.Net.CredentialCache MyCredentialCache;<br />
         string strSourceURI = &#8220;http://localhost/Extracts/Client1/test.csv&#8221;;<br />
         string strDestURI = &#8220;https://200.150.100.50/Uploads/test.csv&#8221;;<br />
         string strUserName = &#8220;UserName&#8221;;<br />
         string strPassword = &#8220;password&#8221;;<br />
         string strDomain = &#8220;Domain&#8221;;</p>
<p>         try<br />
         {<br />
            // Create a new CredentialCache object and fill it with the network<br />
            // credentials required to access the server.<br />
            MyCredentialCache = new System.Net.CredentialCache();<br />
            MyCredentialCache.Add( new System.Uri(strSourceURI),<br />
               &#8220;NTLM&#8221;,<br />
               new System.Net.NetworkCredential(strUserName, strPassword, strDomain)<br />
               );</p>
<p>            // Create the HttpWebRequest object.<br />
            Request = (System.Net.HttpWebRequest)HttpWebRequest.Create(strSourceURI);</p>
<p>            // Add the network credentials to the request.<br />
            Request.Credentials = MyCredentialCache;</p>
<p>            // Specify the COPY method.<br />
            Request.Method = &#8220;COPY&#8221;;</p>
<p>            // Specify the destination URI.<br />
            Request.Headers.Add(&#8221;Destination&#8221;, strDestURI);</p>
<p>            // Specify that if a resource already exists at the<br />
            // destination URI, it will not be overwritten.  The<br />
            // server would return a 412 Precondition Failed status code.<br />
            Request.Headers.Add(&#8221;Overwrite&#8221;, &#8220;F&#8221;);</p>
<p>            // Send the COPY method request.<br />
            Response = (System.Net.HttpWebResponse)Request.GetResponse();</p>
<p>            // Close the HttpWebResponse object.<br />
            Response.Close();</p>
<p>            Console.WriteLine(&#8221;Item successfully copied.&#8221;);</p>
<p>         }<br />
         catch(Exception ex)<br />
         {<br />
            // Catch any exceptions. Any error codes from the COPY<br />
            // method request on the server will be caught here, also.<br />
            Console.WriteLine(ex.Message);<br />
         }<br />
      }<br />
   }</p>
<p>Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hoju Saram</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-10834</link>
		<dc:creator>Hoju Saram</dc:creator>
		<pubDate>Tue, 26 Jun 2007 12:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-10834</guid>
		<description>Hi geoff, 

Just thought I would let you know that I have just posted a post on my blog about C# webdav server with SQL backend. I have included the full source so it may be useful to anyone wanting to have a look at how you might go about building something like this. You can check it out at:

http://thehojusaram.blogspot.com/2007/06/c-webdav-server-with-sql-backend-source.html

Thanks</description>
		<content:encoded><![CDATA[<p>Hi geoff, </p>
<p>Just thought I would let you know that I have just posted a post on my blog about C# webdav server with SQL backend. I have included the full source so it may be useful to anyone wanting to have a look at how you might go about building something like this. You can check it out at:</p>
<p><a href="http://thehojusaram.blogspot.com/2007/06/c-webdav-server-with-sql-backend-source.html" rel="nofollow">http://thehojusaram.blogspot.com/2007/06/c-webdav-server-with-sql-backend-source.html</a></p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pramod</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-10826</link>
		<dc:creator>pramod</dc:creator>
		<pubDate>Mon, 18 Jun 2007 07:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-10826</guid>
		<description>I have configured WebDAV Application on my server win 2003 and everything working fine but  i am not able to set password protectet. plz help me how to over come this problem. ASA</description>
		<content:encoded><![CDATA[<p>I have configured WebDAV Application on my server win 2003 and everything working fine but  i am not able to set password protectet. plz help me how to over come this problem. ASA</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Lane</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-10786</link>
		<dc:creator>Geoff Lane</dc:creator>
		<pubDate>Wed, 30 May 2007 02:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-10786</guid>
		<description>Bill,
Thanks for the great comment and the link to the code.</description>
		<content:encoded><![CDATA[<p>Bill,<br />
Thanks for the great comment and the link to the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Seddon</title>
		<link>http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/comment-page-2/#comment-10753</link>
		<dc:creator>Bill Seddon</dc:creator>
		<pubDate>Fri, 25 May 2007 12:03:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2006/02/02/custom-webdav-server-using-net/#comment-10753</guid>
		<description>I'm adding this post because this blog post is the one I first saw when searching around for some code and information to help implement a webdav server.  The solution I implemented will not suit everyone but for those that may benefit the code is on CodeProject (http://www.codeproject.com/useritems/NET_WebDAV_Server.asp).

I've no doubt there's better code out there but it may give someone a head start. 

I think I've the answer to a couple of the questions posted here.  One is about being able to use a pretty file list that Excel and Word present when interacting with Sharepoint.  The short answer is that you can't.  Although Sharepoint is a WebDAV server, it's also Frontpage server and, in fact, the Office tools use the Frontpage RPC protocol when communicating with Sharepoint.  You can see this if you install Fiddler2 (www.fiddler2.com) a free local proxy implemented by a Microsoft employee that allows you to see all headers and body information sent to and received from an HTTP server.  Because this is a proprietary protocol, Microsoft can and do extend it to do things that are useful to them such as return a nice file listing.

Whenever any of Microsoft's re-directors are used they will default to use Frontpage and this probably explains why the MS header must be returned in response to the OPTIONS verb.

One of the regular question is about installing a WebDAV server.  The example WebDAV server in the CodeProject article can be installed either at an IIS root or at a virtual directory.   In principle it shouldn't matter where the WebDAV is installed.  The Microsoft WebDAV clients will issue an OPTIONS request to the URL specified and issue a PROPFIND if the OPTIONS response is satisfactory.   If it's not, they will then query the web server root.  The chances are that this will generate a good response and so Excel or Word will try to work with it though the result amy not be what you expect.

As suggested here, the WebDAV server is implemented as a IhttpHandler so that the WebDAV serve can be installed using a wildcard map.</description>
		<content:encoded><![CDATA[<p>I&#8217;m adding this post because this blog post is the one I first saw when searching around for some code and information to help implement a webdav server.  The solution I implemented will not suit everyone but for those that may benefit the code is on CodeProject (http://www.codeproject.com/useritems/NET_WebDAV_Server.asp).</p>
<p>I&#8217;ve no doubt there&#8217;s better code out there but it may give someone a head start. </p>
<p>I think I&#8217;ve the answer to a couple of the questions posted here.  One is about being able to use a pretty file list that Excel and Word present when interacting with Sharepoint.  The short answer is that you can&#8217;t.  Although Sharepoint is a WebDAV server, it&#8217;s also Frontpage server and, in fact, the Office tools use the Frontpage RPC protocol when communicating with Sharepoint.  You can see this if you install Fiddler2 (www.fiddler2.com) a free local proxy implemented by a Microsoft employee that allows you to see all headers and body information sent to and received from an HTTP server.  Because this is a proprietary protocol, Microsoft can and do extend it to do things that are useful to them such as return a nice file listing.</p>
<p>Whenever any of Microsoft&#8217;s re-directors are used they will default to use Frontpage and this probably explains why the MS header must be returned in response to the OPTIONS verb.</p>
<p>One of the regular question is about installing a WebDAV server.  The example WebDAV server in the CodeProject article can be installed either at an IIS root or at a virtual directory.   In principle it shouldn&#8217;t matter where the WebDAV is installed.  The Microsoft WebDAV clients will issue an OPTIONS request to the URL specified and issue a PROPFIND if the OPTIONS response is satisfactory.   If it&#8217;s not, they will then query the web server root.  The chances are that this will generate a good response and so Excel or Word will try to work with it though the result amy not be what you expect.</p>
<p>As suggested here, the WebDAV server is implemented as a IhttpHandler so that the WebDAV serve can be installed using a wildcard map.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
