现在我有两个Service类:
UserService
DictionaryService

配置文件是:

WCF中ServiceHost能不能host多个服务?  <system.serviceModel>
WCF中ServiceHost能不能host多个服务?    
<services>
WCF中ServiceHost能不能host多个服务?      
<service name="DictionaryServer.Dal.UserService">
WCF中ServiceHost能不能host多个服务?        
<endpoint address="net.tcp://localhost:8001/UserService"
WCF中ServiceHost能不能host多个服务?                   binding
="netTcpBinding"
WCF中ServiceHost能不能host多个服务?           contract
="Common.Interface.IUserService" >
WCF中ServiceHost能不能host多个服务?        
</endpoint>
WCF中ServiceHost能不能host多个服务?      
</service>
WCF中ServiceHost能不能host多个服务?      
<service name="DictionaryServer.Dal.DictionaryService">
WCF中ServiceHost能不能host多个服务?        
<endpoint address="net.tcp://localhost:8001/DictionaryService"
WCF中ServiceHost能不能host多个服务?                   binding
="netTcpBinding"
WCF中ServiceHost能不能host多个服务?           contract
="Common.Interface.IDictionaryService" >
WCF中ServiceHost能不能host多个服务?        
</endpoint>
WCF中ServiceHost能不能host多个服务?      
</service>
WCF中ServiceHost能不能host多个服务?    
</services>
WCF中ServiceHost能不能host多个服务?  
</system.serviceModel>

以下是我目前的解决方案:

WCF中ServiceHost能不能host多个服务?    class Program
    }


我的问题就是能不能只用一个ServiceHost实例,来加载两个服务类?
要是用我现在这样的实现方案的话,有许多服务类的话,岂不是打开好多个ServiceHost?

相关文章:

  • 2022-12-23
  • 2021-10-10
  • 2021-10-19
  • 2021-11-19
  • 2022-12-23
  • 2022-02-03
  • 2021-09-21
猜你喜欢
  • 2021-12-22
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2022-02-01
  • 2021-07-09
相关资源
相似解决方案