I had developed a website to connect to SharePoint resources (mainly PWA) using following code:
projContext.AuthenticationMode = Microsoft.SharePoint.Client.ClientAuthenticationMode.Default;
System.Security.SecureString password = new System.Security.SecureString();
foreach (char c in pass.ToCharArray()) password.AppendChar(c);
projContext.Credentials = new System.Net.NetworkCredential(user, password, domain);
This code is working fine as a website. However, while I am trying to incorporate same in Xamarin mobile, I am getting following error:
System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest
Request your help in resolving this.