Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
The Api System.Net.NetworkInformation.IPGlobalProperties.GetActiveTcpListeners() was supported as part of Xamarin.iOS version 220.127.116.11; however when updated to latest version (version 5.0 and above) there is run time issue related 'GetActiveTcpListeners()' that this API is not implemented.
Is the removal of this implementation intentional? If it is intentional is there any other api with which we can get the active ports. I could not find any other as part of API documentation.
Thanks & Regards,
I tried to reproduce this issue but not able to reproduce. I tried to search in assembly browser for GetActiveTcpListeners() but getting same behaviour with XA 18.104.22.168 an XA 22.214.171.124. Please have a look on screencast:
Could you please share steps to reproduce this issue or any sample application that demonstrate this issue? That would be very helpful to reproduce this issue at our end.
=== Xamarin Studio ===
Version 5.9.4 (build 5)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Mono 4.0.2 ((detached/c99aa0c)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400020005
=== Xamarin.Android ===
Version: 126.96.36.199 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
=== Xamarin Android Player ===
Version: Unknown version
Location: /Applications/Xamarin Android Player.app
=== Apple Developer Tools ===
Xcode 6.2 (6776)
=== Xamarin.iOS ===
Version: 188.8.131.52 (Business Edition)
Build date: 2015-06-30 15:19:13-0400
=== Xamarin.Mac ===
Version: 184.108.40.206 (Business Edition)
=== 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.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
An update to above comment:
Thanks for the quick response. Will get back with android app built with latest Xamarin.Android.
Thanks & Regards,
> System.Net.NetworkInformation.IPGlobalProperties.GetActiveTcpListeners() was
> supported as part of Xamarin.iOS version 220.127.116.11
I think you're confusing products and versions; Xamarin.iOS != Xamarin.Android, and I don't think there ever was a Xamarin.iOS v18.104.22.168...
There are four references to GetActiveTcpListeners():
The first is the `abstract` method declaration. The second is UnixIPGlobalProperties.GetActiveTcpListeners(), which throws NotImplementedException. The third is in MibIPGlobalProperties, which is some Unix variant, and the fourth is in Win32IPGlobalProperties, which is for Windows.
Android uses AndroidIPGlobalProperties, which inherits UnixIPGlobalProperties.GetActiveTcpListeners:
Which is why you get the NotSupportedException.
That said, the above is for Mono 4.0, which is used in Xamarin.Android 5.1. What about Xamarin.Android 4.20?
Xamarin.Android 4.20 used Mono 3.10, which doesn't have any Android checks...and will *instead* throw NotSupportedException from IPGlobalProperties.GetIPGlobalProperties():
In short, as far as I can tell this never worked on Android.
Thanks for the detailed response.
I'm sorry, you are right it is Xamarin.Android not the iOS.
It works well with the Xamarin.Android v22.214.171.124; though not sure about the mono version used with this; is there a way to check the mono version?
The problem was when upgraded to the latest Xamarin.Android version it throws 'NotSupportedException'.
>>Xamarin.Android 4.20 used Mono 3.10, which doesn't have any Android
checks...and will *instead* throw NotSupportedException from
Below is the code snippet, which works well with Xamarin.Android v126.96.36.199;
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
IPEndPoint ipEndPoints = properties.GetActiveTcpListeners();
Xamarin versions used with Visual Studio :
Xamarin 188.8.131.52 (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android 184.108.40.206 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Visual Studio plugin to enable development for Xamarin.Android.
Xamarin.iOS 220.127.116.11 (840a925103a0bf4a856507f13d5eaee3c1579c2f)
Visual Studio extension to enable development for Xamarin.iOS.
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Android. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.