예제 #1
0
 private static WorkflowService createAPI()
 {
     try {
         string                  url         = (String)ConfigurationManager.AppSettings["ServerUrl"];
         string                  admin       = (String)ConfigurationManager.AppSettings["APAdmin"];
         string                  pass        = (String)ConfigurationManager.AppSettings["APPWD"];
         string                  domain      = (String)ConfigurationManager.AppSettings["APDomain"];
         WorkflowService         api         = new WorkflowService(url);
         System.Net.ICredentials credentials = new System.Net.NetworkCredential(admin, pass, domain);
         api.Credentials = credentials;
         api.CheckAuthenticated();
         api.SetClientAppName("ERS");
         return(api);
     } catch (Exception e) {
         throw new Exception(errorMSGPrefix + e.Message, e);
     }
     return(null);
 }
예제 #2
0
파일: APHelper.cs 프로젝트: hijoy/VSL_ERS
 private static WorkflowService createAPI()
 {
     try {
         string url = (String)ConfigurationManager.AppSettings["ServerUrl"];
         string admin = (String)ConfigurationManager.AppSettings["APAdmin"];
         string pass = (String)ConfigurationManager.AppSettings["APPWD"];
         string domain = (String)ConfigurationManager.AppSettings["APDomain"];
         WorkflowService api = new WorkflowService(url);
         System.Net.ICredentials credentials = new System.Net.NetworkCredential(admin, pass, domain);
         api.Credentials = credentials;
         api.CheckAuthenticated();
         api.SetClientAppName("ERS");
         return api;
     } catch (Exception e) {
         throw new Exception(errorMSGPrefix + e.Message, e);
     }
     return null;
 }