Is it possible to instantiate a WebServiceHost via an instance of the service type, without a parameterless constructor?
问题 I am trying to create self-hosted System.ServiceModel.Web.WebServiceHost (.NET 4), however I am running into an issue with the constructor. There are three options: WebServiceHost() a parameterless constructor that seems pointless, as there's no way to specify the type of the service, or even the contract. Reflecting on it, it doesn't do anything- just an empty default constructor that doesn't call base. WebServiceHost(object singletonInstance, params Uri[] baseAddresses) I don't want a