我想從WCF Windows host.EXE文件加載WCF服務DLL。但WCf Service.dll存儲在其他文件夾中。從WCF Windows主機中的不同文件夾加載WCF服務
文件夾結構:
\@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>
當我開始我的窗口服務,我收到以下錯誤:
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'.
由於事先 尼扎姆
您是否找到原因? – 2012-02-21 16:49:17