I have a WCF Console Application with the following app.config file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netNamedPipeBinding>
<binding name="namedPipeBindingConfig" maxBufferPoolSize="268435456" maxBufferSize="16777216" maxReceivedMessageSize="16777216" />
</netNamedPipeBinding>
</bindings>
<services>
<service behaviorConfiguration="serviceBehavior" name="MyTestNamespace.MyTestClassService">
<endpoint address="net.pipe://localhost/MyService"
binding="netNamedPipeBinding" bindingConfiguration="namedPipeBindingConfig"
name="NamedPipeBinding" contract="MyTestNamespace.IMyTestContract" />
</service>
</services>
</system.serviceModel>
</configuration>
I am hosting it as a console app (interface, implementation and hosting class all in a single project), basically doing this:
ServiceHost host = new ServiceHost(typeof(MyTestClassService));
host.Open();
I run from command prompt "C:\SomePath\>RunMyService.exe" and it starts and works great. Now, I am planning to host this in IIS 7 and I did not find any good examples on how to get this (console application specifically) deployed there. Few questions I have are:
1) Do I need to "Add website" or "Add Application" in IIS and put my files there ?
2) Will I be needing a .svc file ? If yes, what must it contain and how do I tell it to start this console app.
3) Will this console app run inside IIS ? How does this work ?