Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

ServicePointManager and many other System.Net classes are not available in Xamarin projects

I am using Xamarin V2.0.0.6482 with .NET v4.5 and I'm trying to set a security protocol in the ServicePointManager class, but Visual Studio does not recognize the class and the project does not build. If I check what classes from the System.Net namespace I can use it is a very short list.

I'm trying to execute this line of code:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

and this is the error I'm getting:
The type or namespace name 'ServicePointManager' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)

What could be causing this?

Best Answer


Sign In or Register to comment.