Migrating from IIS Mode to Windows Service Mode / Custom Coded Applications and ASP.NET Applications |
The code examples in this topic show how to consume an AgilePoint API running in Window Service mode.
public IWFAdminService GetAdm() { … ….. ……. string hostingMechanism = null; if (String.IsNullOrEmpty(ConfigurationSettings.AppSettings["HostingMechanism"])) hostingMechanism = "IIS"; else hostingMechanism = (String)ConfigurationSettings.AppSettings["HostingMechanism"]; if (hostingMechanism.ToLower() != "wcf") { //CODE Snippet for creating WorkFlowService object in AgilePoint WebService (IISVersion) ……… ……. } else { string user = domainname + @"\" + username; string adminBinding = (String)ConfigurationSettings.AppSettings["AdminBindingUsed"]; m_adm = new WCFAdminProxy("SampleApplication", "CSC-NINE", locale, user, credentials, adminBinding); String username = m_adm.CheckAuthenticated(); } … … … }
public IWFWorkflowService GetApi() { …… …… …. string hostingMechanism = null; if String.IsNullOrEmpty(ConfigurationSettings.AppSettings["HostingMechanism"])) hostingMechanism = "IIS"; else hostingMechanism = (String)ConfigurationSettings.AppSettings["HostingMechanism"]; if (hostingMechanism.ToLower() != "wcf") { //CODE Snippet for creating WorkFlowService object in AgilePoint WebService (IISVersion) ……… ……. } else { // CODE snippet for creating WorkFlowService object in AgilePoint WCF version. string user = domainname + @"\" + username; string workflowBinding = (String)ConfigurationSettings.AppSettings["WorkFlowBindingUsed"]; // WCF Binding used m_api = new WCFWorkflowProxy("MyApplication", "CSC-NINE", locale, user, credentials, workflowBinding); m_api.CheckAuthenticated(); } …. …. }