我有应用程序,已经有服务。ServiceHost的2个实例可以在一个应用程序中吗?
ServiceHost serviceHost = null;
serviceHost = new ServiceHost(typeof(*.*.*.*.com.MapViewPortTypeClient), new Uri(uri));
我可以在这个应用程序中创建的ServiceHost的另一个实例,例如:
ServiceHost serviceHostKW = null;
serviceHostKW = new ServiceHost(typeof(*.*.*.*.com.ClientKW), new Uri(uriKW));
所以在此之后将是2个服务(服务器)在此应用程序。我会有什么问题吗?
你试过了吗? –
你将没有问题。有类似的问题 http://stackoverflow.com/questions/54419/how-to-host-2-wcf-services-in-1-windows-service/77401 – Redwan
你可以有n-numer的服务调用。 – Jay