How to specify ServiceHostFactory for self-hosted WCF service with no SVC file
问题 My application runs as a Windows service. It dynamically creates WCF services using the following helper method: public static void StartWebService(string webServiceName, Type serviceContractType, Type serviceImplementationType) { if (string.IsNullOrEmpty(webServiceName)) return; var baseAddress = GetWebServiceAddress(webServiceName); var baseUri = new Uri(baseAddress); lock (RunningWebServices) { if (RunningWebServices.ContainsKey(webServiceName)) return; var webServiceHost = new ServiceHost