I am still learning to program in C# and working on a project in office
public static void SetIdentity(string subId)
{
if (Proxy.ClientCredentials != null)
{
Proxy.ClientCredentials.UserName.UserName = subId;//
Proxy.ClientCredentials.UserName.Password = subId;
}
ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(customXertificateation);
}
This is where I get this exception: NullReferenceException was unhandled by user code
Can someone please take a look and suggest me what could be be wrong here?