title: WCF error with net.tcp "The service endpoint failed to listen on the URI because access was denied
body: <p>I'm getting the following error when hosting WCF Net.Tcp service on windows 8.1 machine where I'm in the administrators group:
  The service endpoint failed to listen on the URI 'net.tcp://localhost:9001/dataservice' because access was denied.  Verify that the current user is granted access in the appropriate allowAccounts section of SMSvcHost.exe.config.</p>
  
  <p>I even added the user to the config as suggested:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!-- The configuration file for SMSvcHost.exe --&gt;
  &lt;configuration&gt;
      &lt;runtime&gt;
          &lt;gcConcurrent enabled="false" /&gt;
      &lt;/runtime&gt;
      &lt;system.serviceModel&gt;
          &lt;!-- SMSvcHost ETW traces are redirected by default to an etwProviderId different from WCF's default. 
               To trace to the default provider, remove the etwProviderId attribute below. --&gt;
          &lt;diagnostics performanceCounters="Off" etwProviderId="{f18839f5-27ff-4e66-bd2d-639b768cf18b}"/&gt;
      &lt;/system.serviceModel&gt;
      &lt;system.serviceModel.activation&gt;
      &lt;net.tcp listenBacklog="10" maxPendingConnections="100" maxPendingAccepts="2" receiveTimeout="00:00:10" teredoEnabled="false"&gt;
              &lt;allowAccounts&gt;
                  &lt;add securityIdentifier="S-1-5-18"/&gt;
  
                  &lt;add securityIdentifier="S-1-5-19"/&gt;
  
                  &lt;add securityIdentifier="S-1-5-20"/&gt;
  
                  &lt;add securityIdentifier="S-1-5-32-544" /&gt;
  
  
          &lt;add securityIdentifier="S-1-5-21-2476327175-1934278006-4092406606"/&gt;
              &lt;/allowAccounts&gt;
          &lt;/net.tcp&gt;
      &lt;net.pipe maxPendingConnections="100" maxPendingAccepts="2" receiveTimeout="00:00:10"&gt;
              &lt;allowAccounts&gt;
                  &lt;add securityIdentifier="S-1-5-18"/&gt;
  
                  &lt;add securityIdentifier="S-1-5-19"/&gt;
  
                  &lt;add securityIdentifier="S-1-5-20"/&gt;
  
                  &lt;add securityIdentifier="S-1-5-32-544" /&gt;
  
  
          &lt;add securityIdentifier="S-1-5-21-2476327175-1934278006-4092406606"/&gt;
              &lt;/allowAccounts&gt;
          &lt;/net.pipe&gt;
          &lt;diagnostics performanceCountersEnabled="true" /&gt;
      &lt;/system.serviceModel.activation&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>But still get the same error, this works fine without any need for config change on a W7 machine, any ideas?</p>