/// <summary> /// Start the HTTP Service /// </summary> /// <param name="NetTCPServiceHost"></param> public void StartHTTPService() { if (_HTTPserviceHost != null) { _HTTPserviceHost.Close(); } _HTTPserviceHost = null; _HTTPserviceHost = new System.ServiceModel.Web.WebServiceHost(typeof(wcfTeenService.wcf.TeenService)); _HTTPserviceHost.Open(); }
public void Stop() { switch (_svc_hosts_type) { case ServiceHostType.soap: if (_soap_service_host != null) { _soap_service_host.Close(); } break; case ServiceHostType.web: if (_web_service_host != null) { _web_service_host.Close(); } break; } }