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); }
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; }