title: WCF net.tcp port sharing on IIS 7 / WAS
body: <p>I am new to wcf programming and I have been working on a small project and am having problems with net.tcp port sharing. I am using .net framework 4 and iis 7.</p>
  
  <p>I have two wcf services (serviceA and serviceB) being hosted on our server in separate websites on IIS. Each website has its own .svc file, web.config and bin. If I have each of these services on different net.tcp ports then there is no problem and I can add the service reference to each of them from visual studio on my pc. The services run fine.</p>
  
  <p>However we will soon be starting a project with many more services and we wish to avoid having to open a tcp port for each one so I have been trying to get serviceA and serviceB to port share. If I set them up on the same port then I can access the first service I add but when when I try to access the second service added to the same port i get the following error:</p>
  
  <blockquote>
    <p>Metadata contains a reference that cannot be resolved:
    'net.tcp://<em>myserver</em>/serviceB.svc'. The socket connection was aborted. This
    could be caused by an error processing your message or a receive
    timeout being exceeded by the remote host, or an underlying network
    resource issue. Local socket timeout was <strong>**</strong>. An
    existing connection was forcibly closed by the remote host If the
    service is defined in the current solution, try building the solution
    and adding the service reference again.</p>
  </blockquote>
  
  <p>I can not work out what is going wrong. I have done a lot of searching on the subject and I have made sure that the following services are running:</p>
  
  <p>Windows Process Activation Service
  Net.Tcp Port Sharing Service
  Net.Tcp Listener Adaptor</p>
  
  <p>In addition net.tcp is an enabled protocol in the website's advanced settings. My current best guess is that it might have something to do with how I have defined the net.tcp bindings in IIS manager. Both of my websites running their independant services have the following: 808:*(net.tcp)  is this correct?</p>
  
  <p>As i said earlier the tcp services run fine if set up on two separate ports so the issue must be related to the port sharing. Very grateful for any advice</p>