Note that there are some explanatory texts on larger screens.

plurals
  1. POIIS-hosted WCF service with net.tcp binding unreachable
    text
    copied!<p>I'm trying to host a WCF service with net.tcp binding within an IIS 7.5 site on Windows 7, 64-bit. Sadly, the service is unreachable. In fact, opening a connection to the TCP port using telnet even fails.</p> <p>Here's what my system.serviceModel section of the web.config for the site looks like:</p> <pre><code>&lt;system.serviceModel&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="DefaultServiceBehavior"&gt; &lt;serviceMetadata httpGetEnabled="false" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2000000" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;services&gt; &lt;service behaviorConfiguration="DefaultServiceBehavior" name="FooService"&gt; &lt;endpoint binding="netTcpBinding" bindingConfiguration="service" name="service" contract="IFoo" /&gt; &lt;endpoint binding="mexTcpBinding" bindingConfiguration="DuplexBinding" contract="IFoo" /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="net.tcp://127.0.0.1:9000/service"/&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;bindings&gt; &lt;netTcpBinding&gt; &lt;binding name="service" portSharingEnabled="true"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;security mode="None"/&gt; &lt;/binding&gt; &lt;binding name="DuplexBinding"&gt; &lt;reliableSession enabled="true"/&gt; &lt;security mode="None"/&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;/bindings&gt; &lt;/system.serviceModel&gt; </code></pre> <p>In IIS Manager, I set up a site with an App Pool running under the identity of NETWORK SERVICE, with the v4.0 .NET Framework and an integrated pipeline. There is one binding for the site with a type of <code>net.tcp</code> and "Binding Information" set to <code>9000:*</code>.</p> <p>Under my computer's services, I started the previously stopped "Net.Tcp Listener Adapter" and "Net.Tcp Port Sharing Service" services and made them both start up automatically. I also ensured that "Windows Communication Foundation Non-HTTP Activation" was installed.</p> <p>What else do I have to do to get IIS/WCF/WAS/whatever to listen on port 9000 so my service can be activated and invoked?</p> <p><em>My question is similar to <a href="https://stackoverflow.com/questions/7181011/host-wcf-service-with-net-tcp-binding-through-iis-manager-7-5">Host WCF service with net.tcp binding through IIS Manager 7.5</a>, but the OP was not registered, and his question was not answered. I'm opening this question so I can post my own details.</em></p> <p><strong>Update</strong></p> <p>I've found some additional clues. I decided to add a second binding so I can work with HTTP bindings while trying to figure out the net.tcp issues. Now, when I try to access the HTTP endpoint, I get this error</p> <blockquote> <p>Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]</p> </blockquote> <p>I very clearly <em>have</em> bindings for both HTTP and net.tcp here:</p> <pre><code>&lt;baseAddresses&gt; &lt;add baseAddress="net.tcp://localhost:9000/"/&gt; &lt;add baseAddress="http://localhost:8050/"/&gt; &lt;/baseAddresses&gt; </code></pre> <p>So the phrase "Registered base address schemes" has me worried; is there something additional I have to do to allow my site to support the net.tcp scheme?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload