Bug 32852 - WebException: Cannot open passive data connection
Summary: WebException: Cannot open passive data connection
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries ()
Version: XI 8.10
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-08-06 23:49 UTC by Frank A. Krueger
Modified: 2015-08-07 00:00 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Frank A. Krueger 2015-08-06 23:49:04 UTC
When trying to download an FTP file on the device:

System.Net.WebException: Cannot open passive data connection

Code:

    open System
    let client = new Net.WebClient ()
    let tempPath = IO.Path.GetTempFileName ()
    client.DownloadFile ("ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/19/IMG/ned19_n47x75_w122x50_wa_puget_sound_2000.zip", tempPath)


This works on the simulator.

System.Net.WebException: Cannot open passive data connection
at System.Net.FtpWebRequest.SetupPassiveConnection (System.String statusDescription) [0x0017b] in //Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.3.2/src/mono/mcs/class/System/System.Net/FtpWebRequest.cs:881
at System.Net.FtpWebRequest.InitDataConnection () [0x00035] in //Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.3.2/src/mono/mcs/class/System/System.Net/FtpWebRequest.cs:932
at System.Net.FtpWebRequest.OpenDataConnection () [0x00000] in //Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.3.2/src/mono/mcs/class/System/System.Net/FtpWebRequest.cs:967
at System.Net.FtpWebRequest.DownloadData () [0x00007] in //Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.3.2/src/mono/mcs/class/System/System.Net/FtpWebRequest.cs:749
at System.Net.FtpWebRequest.ProcessMethod () [0x001a7] in //Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.3.2/src/mono/mcs/class/System/System.Net/FtpWebRequest.cs:614
at System.Net.FtpWebRequest.ProcessRequest () [0x0002a] in //Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.3.2/src/mono/mcs/class/System/System.Net/FtpWebRequest.cs:509



=== Xamarin Studio ===

Version 5.9.4 (build 5)
Installation UUID: fce13fdd-e8e3-48ef-99f1-4acbb06f0240
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Xamarin.Android ===

Version: 5.1.4.16 (Enterprise Edition)
Android SDK: /Users/fak/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.4 (7720)
Build 6E35b

=== Xamarin.Mac ===

Version: 2.0.2.35 (Enterprise Edition)

=== Xamarin.iOS ===

Version: 8.10.3.2 (Enterprise Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400

=== Build Information ===

Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.10.4
Darwin muon.local 14.4.0 Darwin Kernel Version 14.4.0
    Thu May 28 11:35:04 PDT 2015
    root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
Comment 1 Frank A. Krueger 2015-08-07 00:00:46 UTC
My apologies - the downloads were just more flaky than on the desktop. It does work if you try enough.