I have a WCF service that I would like to host in IIS 7.5. My setup: The physical path of the folder with .svc file is: C:\inetpub\wwwroot\SmartSolution\Services\Services\ContainerManagementService.svc My binaries are in C:\inetpub\wwwroot\SmartSolution\Services\bin and I also copied them to C:\inetpub\wwwroot\SmartSolution\Services\Services\bin
I have created a web application in IIS for both Services folders.
Here is the config file for the WCF endpoint:
<service behaviorConfiguration="MyNamespace.ContainerManagementServiceBehavior"
name="MyNamespace.ContainerManagementService">
<endpoint address="" binding="basicHttpBinding"
name="ContainerManagementbasicHttpEndpoint" contract="MyNamespace.IContainer"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<behaviors>
<behavior name="MyNamespace.ContainerManagementServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</behaviors>
Here is my .svc file makrkup:
<%@ ServiceHost Language="C#" Debug="true" Service="MyNamespace.ContainerManagementService" CodeBehind="ContainerManagementService.svc.cs" %>
When I try to navigate to: http://localhost/SmartSolution/Services/Services/ContainerManagementService.svc , the following error is displayed:
Server Error in '/SMARTSOLUTION/Services/Services' Application. [ServiceActivationException: The service '/SMARTSOLUTION/Services/Services/ContainerManagementService.svc' cannot be activated due to an exception during compilation. The exception message is: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1).] is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
How can I get the service to work. Thanks!