{"id":2019,"date":"2011-10-19T12:05:23","date_gmt":"2011-10-19T10:05:23","guid":{"rendered":"http:\/\/www.limilabs.com\/blog\/?p=2019"},"modified":"2013-11-01T23:26:52","modified_gmt":"2013-11-01T21:26:52","slug":"ftp-active-vs-passive","status":"publish","type":"post","link":"https:\/\/www.limilabs.com\/blog\/ftp-active-vs-passive","title":{"rendered":"FTP Active vs Passive"},"content":{"rendered":"<p>Ftp.dll <a href=\"\/ftp\">.NET FTP component<\/a> supports both Active and Passive mode FTP transfers.<\/p>\n<p>In <strong>Active<\/strong> mode client waits for incomming data connections, in <strong>Passive<\/strong> mode client establishes data connections.<\/p>\n<p>Passive mode is default. You can switch to Active mode using <strong>Mode<\/strong> property:<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n\/\/ C#\r\n\r\nusing (Ftp client = new Ftp())\r\n{\r\n    client.Mode = FtpMode.Active;\r\n\r\n    client.Connect(&quot;ftp.example.com&quot;);\r\n    client.Login(&quot;user&quot;, &quot;password&quot;);\r\n\r\n    \/\/ ...\r\n\r\n    client.Close();\r\n}\r\n\r\n<\/pre>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n' VB.NET\r\n\r\nUsing client As New Ftp()\r\n    client.Mode = FtpMode.Active\r\n\r\n    client.Connect(&quot;ftp.example.com&quot;)\r\n    client.Login(&quot;user&quot;, &quot;password&quot;)\r\n\r\n    ' ...\r\n\r\n    client.Close()\r\nEnd Using\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Ftp.dll .NET FTP component supports both Active and Passive mode FTP transfers. In Active mode client waits for incomming data connections, in Passive mode client establishes data connections. Passive mode is default. You can switch to Active mode using Mode property: \/\/ C# using (Ftp client = new Ftp()) { client.Mode = FtpMode.Active; client.Connect(&quot;ftp.example.com&quot;); client.Login(&quot;user&quot;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[15,22,80,24,57],"class_list":["post-2019","post","type-post","status-publish","format-standard","hentry","category-ftp-dll","tag-c","tag-ftp","tag-ftp-component","tag-ftps","tag-vb-net"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/2019"}],"collection":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/comments?post=2019"}],"version-history":[{"count":3,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/2019\/revisions"}],"predecessor-version":[{"id":4407,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/2019\/revisions\/4407"}],"wp:attachment":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/media?parent=2019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/categories?post=2019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/tags?post=2019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}