本文介绍了从WCF Windows主机中的其他文件夹加载WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从WCF Windows host.EXE文件加载WCF服务dll.但是WCf Service.dll存储在其他文件夹中.
文件夹结构:
\ @root \ Service \ WCFService.dll(这是服务)
\ @root \ Host \ WCFHost.exe(这是主机exe)
\ @root \ Host \ WCFHost.exe.config(这是主机exe配置)
Hi,
I want to load WCF service dll from WCF Windows host.EXE file. But WCf Service.dll is stored in some other folder.
Folder structure:
\@root\Service\WCFService.dll (this is service)
\@root\Host\WCFHost.exe (this is host exe)
\@root\Host\WCFHost.exe.config (this is host exe configuration)
<services>
<service name="XXX.Service">
<endpoint address="http" binding="basicHttpBinding" contract="XXX.IService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8035/Service" />
</baseAddresses>
</host>
</service>
<services>
当我启动Windows服务时,出现以下错误:
When I start my windows service, I am getting the following error:
Service cannot be started. System.IO.FileNotFoundException: Could not load file or assembly 'XXX.Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'XXX.Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
在此先感谢,
Nizam
Thanks in Advance,
Nizam
推荐答案
这篇关于从WCF Windows主机中的其他文件夹加载WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!