문제

I have the app, where already there is the service.

ServiceHost serviceHost = null;
serviceHost = new ServiceHost(typeof(*.*.*.*.com.MapViewPortTypeClient), new Uri(uri));

Can i create another instance of ServiceHost in this application, for example:

ServiceHost serviceHostKW = null;
serviceHostKW = new ServiceHost(typeof(*.*.*.*.com.ClientKW), new Uri(uriKW));

So after this it will be 2 services (servers) in this app. Will I have any problems?

도움이 되었습니까?

해결책

Yes you can create as many ServiceHost instances, as you want.. but obviously url:port should be different

다른 팁

Yes!! You can Host Multiple services in one solution with multiple endpoints and hosting. Go through this Link http://dotnetmentors.com/multiple-wcf-services-in-one-solution-with-multiple-endpoints-and-hosting.aspx hope it will be helpful.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top