コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: ProxyLoader.cs プロジェクト: mil-oss/fgsms
 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;
 }