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>
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'.
Thanks in Advance, Nizam
Assuming XXX in your code sample is the fully qualified namespace to the service implementation, then here are some suggestions:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.