public static reportingService GetRSProxy(string url, string username, string password, ConfigLoader.AuthMode authMode, string pkiinfo) { ServicePointManager.Expect100Continue = false; reportingService r = new reportingService(); r.Url = url; switch (authMode) { case ConfigLoader.AuthMode.usernamePassword: r.Credentials = new NetworkCredential(username, (password)); break; case ConfigLoader.AuthMode.PKI: r.ClientCertificates.Add(FindCert(pkiinfo)); break; } return(r); }
public static reportingService GetRSProxy(string url, string username, string password, ConfigLoader.AuthMode authMode, string pkiinfo) { ServicePointManager.Expect100Continue = false; reportingService r = new reportingService(); r.Url = url; switch (authMode) { case ConfigLoader.AuthMode.usernamePassword: r.Credentials = new NetworkCredential(username, (password)); break; case ConfigLoader.AuthMode.PKI: r.ClientCertificates.Add(FindCert(pkiinfo)); break; } return r; }