<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>[How Do I:] Use the FtpWebRequest Class to Create an FTP Connection to a FTP Server</title><link>http://www.asp.net</link><pubDate>Mon, 20 Jun 2011 11:59:24 GMT</pubDate><generator>umbraco</generator><description>Comments for [How Do I:] Use the FtpWebRequest Class to Create an FTP Connection to a FTP Server</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/33520" rel="self" type="application/rss+xml" /><item><title>Comment Posted by shaheenstar</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Fri, 19 Dec 2008 19:00:09 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006215</guid><description><![CDATA[ <p>Very helpful</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/shaheenstar.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by agrawalbs</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Sat, 20 Dec 2008 01:06:06 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006216</guid><description><![CDATA[ <p>this is really very helpful, thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/agrawalbs.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by srameh</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Sun, 21 Dec 2008 15:50:11 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006217</guid><description><![CDATA[ <p>Very helpful. But if you can shorten these videos by having the &lt;asp:Controls pre added to the page or by dragging and dropping them from the Toolbox instead of handcoding... would save some time. Over all it is awesome!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/srameh.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by rami_nassar</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Mon, 22 Dec 2008 01:12:38 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006218</guid><description><![CDATA[ <p>as usual thanks chris</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/rami_nassar.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by bluealigator</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Fri, 26 Dec 2008 11:25:11 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006219</guid><description><![CDATA[ <p>This video is excellent.</p> <p>Now I will have to find out how to add an entire folder instead of a single file or files. Does anyone know how to add an entire folder instead of a single file or is it even possible?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/bluealigator.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by iamrathan</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Mon, 29 Dec 2008 15:27:03 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006220</guid><description><![CDATA[ <p>chris thanks for your post,</p> <p>can u suggest me ...how to download a folder from a ftp server? is this possible in web application?</p> <p>is der any other techniques to handle this??</p> <p>its really urgent for me....</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/iamrathan.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Pushkar</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Thu, 08 Jan 2009 11:16:38 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006221</guid><description><![CDATA[ <p>Thanks for the nice one.We will appreciate if you elaborate more.Thanks again. </p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Pushkar.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jasbits</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Mon, 19 Jan 2009 13:28:12 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006222</guid><description><![CDATA[ <p>Thanks,this was great</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/jasbits.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by hieutdhn</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Wed, 21 Jan 2009 03:10:55 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006223</guid><description><![CDATA[ <p>thanks, this was helpful</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/hieutdhn.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by georgemitchell</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Thu, 29 Jan 2009 11:35:29 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006224</guid><description><![CDATA[ <p>Never used ASP.NET so excuse the stupid question please.</p> <p>Doesn&#39;t this example upload a file from the webserver to an FTP server?</p> <p>I mean, what actually executes in the browser? I thought only javascript can run, but you&#39;re creating standard .NET WebRequest objects etc.</p> <p>If I&#39;m blind to the obvious please explain gently. After all, if I can&#39;t understand it there must be others too!</p> <p>Thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/georgemitchell.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by CStroliaDavis</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Thu, 05 Feb 2009 14:02:17 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006225</guid><description><![CDATA[ <p>Hey georgemitchell,</p> <p>I believe I can answer this question for you.</p> <p>The asp:fileupload control, which outputs an &lt;input type=&quot;file&quot;&gt; type control on the web page, handles the uploading of the file from the client machine to the web server. </p> <p>When you submit the webform, it uploads the file to the web server, which appears as a byte array to ASP.net. </p> <p>Most of what executes in the browser is already abstracted in the &lt;input type=&quot;file&quot;&gt; control. No javascript is necessary (indeed, because of security, javascript usually can&#39;t do much with the file upload control at all), and the browser itself already handles the part of opening a file browser on the client when the browse button is pressed. It also handles wrapping the file up into the information that gets sent to the server when the form is submitted (note: I believe the method is required to be &quot;post&quot; for this, although I&#39;ve never tried it another way). </p> <p>In this example, that byte information is being put into a filestream and sent directly to the ftp server from the web server. (uploadFile control)</p> <p>So, in answer to the question, yes, the example uploads the file from the web server to the ftp server but that is only after the client browser already uploaded the file to the web server. </p> <p>Hope this helps</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/CStroliaDavis.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by bbudz</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Tue, 10 Feb 2009 12:48:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006226</guid><description><![CDATA[ <p>Excellent video! &#160;Very much appreciated.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/bbudz.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by bohunt</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Fri, 13 Feb 2009 17:44:18 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006227</guid><description><![CDATA[ <p>Useful, thanks.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/bohunt.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by barik.jyoti</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Thu, 23 Apr 2009 15:28:53 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006228</guid><description><![CDATA[ <p>This example was really helpful. Thanks Chris for that. It would be really helpful if any one can help me out with navigating and downloading from ftp using the same ftpwebrequest. Thanks in advance!!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/barik.jyoti.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by kbaffoe</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Sat, 09 May 2009 00:59:10 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006229</guid><description><![CDATA[ <p>This video only works for me when I debug and test on the local machine. The local machine is also the ftp server. It does not actually work when I deploy and use from a remote machine. No errors are generated but it just doesn&#39;t transfer the files over</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/kbaffoe.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by davidlposton</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Tue, 23 Feb 2010 16:53:01 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006230</guid><description><![CDATA[ <p>I&#39;m having the same problem as kboffoe. I tried following the tutorial and coding it myself but that didn&#39;t work so I downloaded the source code, change the ftp site, username, and password and it didn&#39;t work either. I try to upload a small text file but when I click transfer file nothing uploads. Label doesn&#39;t populate with any text at all so I&#39;m not able to indicate what might be going wrong. Any suggestions as to why it&#39;s not working?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/davidlposton.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by RajibRoy</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Sat, 24 Apr 2010 14:36:36 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006231</guid><description><![CDATA[ <p>Hi, Whats is the maximum file size we can upload through this coding.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/RajibRoy.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by pranayesh</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Tue, 15 Jun 2010 13:24:08 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009104</guid><description><![CDATA[ <p>Hello</p><p>The Code Of This Video in C# is not work properly so plz Check and Get answer What problem in C# code as soon as............</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/pranayesh.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by indavinci</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Thu, 09 Sep 2010 01:30:05 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000010168</guid><description><![CDATA[ <p>Hey,</p><p></p><p>I am getting an error</p><p></p><p>Could not find file &#39;2001B.png&#39;.</p><p></p><p>I tried to locate the source of the problems, it is like this,</p><p></p><p>Dim fi As FileInfo = New FileInfo(uploadFile.PostedFile.FileName)</p><p>fi is not getting the path as it should get e.g c:/pics/2001B.jpg</p><p></p><p>what is is doing instead is searching in some other folder</p><p>DirectoryName = &quot;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE&quot;</p><p></p><p>Any way to get this resolved?</p><p></p><p>Thanks</p><p></p><p>Deepesh</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/indavinci.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by mights</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Wed, 29 Sep 2010 07:58:30 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000010428</guid><description><![CDATA[ <p>I am getting an error </p><p>&quot;A page can have only one server-side Form tag&quot;</p><p>Does someone know what is the problem?</p><p>Thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/mights.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by suzyb</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Mon, 20 Jun 2011 11:58:21 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013566</guid><description><![CDATA[ <p>To fix the problem indavinci mentions just  use uploadFile.FileBytes.</p><p></p><p>Byte[] contents = FileUpload.FileBytes;</p><p></p><p>//Write file contents to FTP server</p><p>Stream rs = ftpRequest.GetRequestStream();</p><p>rs.Write(contents, 0, Convert.ToInt32(contents.Length));</p><p>rs.Close();</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/suzyb.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by suzyb</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server</link><pubDate>Mon, 20 Jun 2011 11:59:24 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013567</guid><description><![CDATA[ <p>Sorry in my example I meant</p><p></p><p>Byte[] contents = uploadFile.FileBytes;</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/suzyb.jpg?forceidenticon=false&amp;dt=635072186400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>