Forum Cross Platform with Xamarin

Can't Use System.Security.Authentication Namespace

As part of my PCL code I am using an HttpClient to send a request to a secure HTTP service. I am intentionally forcing a security exception so that I can present a user-friendly error message. When debugging I see that the type of exception I get back is of System.Security.Authentication.AuthenticationException. However I am unable to import the System.Security.Authentication namespace into the code file.

How is this possible? The debugger is explicitly telling me that the exception of type System.Security.Authentication.AuthentitcationException, yet I am unable to reference this type in my PCL.

The .NET reference in my PCL is .NETPortable v 4.5 and is using Profile 111.


Sign In or Register to comment.