title: Changing from WSDualHttpBinding to NetTcpBinding doesn't seem to work
body: <p>I have a client-server application. I have been using WsDualHttpBinding for callbacks and all is well. The WCF service uses x509Certificates. The app will be hosted within the org's intranet. I have opted to configure NetTcpBinding on a dedicated port. The WCF Service runs on NetworkService and accesses MSSQL Server DB on login NetworkService.
  The Wcf services are hosted on a website in IIS.</p>
  
  <p>The app.config for the client looks like this</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;system.net&gt;
      &lt;connectionManagement&gt;
        &lt;remove address="*" /&gt;
        &lt;add address="*" maxconnection="200" /&gt;
      &lt;/connectionManagement&gt;
    &lt;/system.net&gt;
    &lt;system.serviceModel&gt;
      &lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="certForClient"&gt;
            &lt;CustomBehaviorExtension /&gt;
            &lt;clientCredentials&gt;
              &lt;serviceCertificate&gt;
                &lt;authentication certificateValidationMode="None" revocationMode="NoCheck" /&gt;
              &lt;/serviceCertificate&gt;
              &lt;clientCertificate findValue="localhost" x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="My" /&gt;
            &lt;/clientCredentials&gt;
            &lt;dataContractSerializer maxItemsInObjectGraph="2147483647" /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;bindings&gt;
        &lt;netTcpBinding&gt;
          &lt;binding closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
                   transactionFlow="true" transferMode="Buffered" transactionProtocol="OleTransactions" 
                   hostNameComparisonMode="StrongWildcard" listenBacklog="3000" maxBufferPoolSize="2147483647" 
                   maxBufferSize="2147483647" maxConnections="1500" maxReceivedMessageSize="2147483647"&gt;
            &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" 
                          maxBytesPerRead="2147483647" maxNameTableCharCount="16384" /&gt;
            &lt;reliableSession ordered="true" inactivityTimeout="20:00:10" enabled="true" /&gt;
            &lt;security mode="Message"&gt;
              &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /&gt;
              &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/netTcpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
        &lt;endpoint address="net.tcp://localhost/Service1.svc" 
                  binding="netTcpBinding" 
                  contract="SampleWCFProxy.IService1" 
                  behaviorConfiguration="certForClient"&gt;
          &lt;identity&gt;
            &lt;dns value="localhost" /&gt;
          &lt;/identity&gt;
        &lt;/endpoint&gt;
        &lt;endpoint address="net.tcp://localhost/Service2.svc" 
                  binding="netTcpBinding" 
                  contract="SampleWCFProxy.IService2" 
                  behaviorConfiguration="certForClient"&gt;
          &lt;identity&gt;
            &lt;dns value="localhost" /&gt;
          &lt;/identity&gt;
        &lt;/endpoint&gt;
      &lt;/client&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>The web.config looks like this </p>
  
  <pre><code>&lt;configuration&gt;
    &lt;system.net&gt;
      &lt;connectionManagement&gt;
        &lt;remove address="*" /&gt;
        &lt;add address="*" maxconnection="200" /&gt;
      &lt;/connectionManagement&gt;
    &lt;/system.net&gt;
  
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;netTcpBinding&gt;
          &lt;binding closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
                   transactionFlow="true" transferMode="Buffered" transactionProtocol="OleTransactions" 
                   hostNameComparisonMode="StrongWildcard" listenBacklog="3000" maxBufferPoolSize="2147483647" 
                   maxBufferSize="2147483647" maxConnections="1500" maxReceivedMessageSize="2147483647"&gt;
            &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" 
                          maxBytesPerRead="2147483647" maxNameTableCharCount="16384" /&gt;
            &lt;reliableSession ordered="true" inactivityTimeout="20:00:10" enabled="true" /&gt;
            &lt;security mode="Message"&gt;
              &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /&gt;
              &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/netTcpBinding&gt;
      &lt;/bindings&gt;
  
      &lt;behaviors&gt;
          &lt;behavior name="ApplicationFaults"&gt;
            &lt;ApplicationBehaviorExtension /&gt;
            &lt;CustomBehaviorExtension /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="MyServiceBehavior"&gt;
            &lt;serviceCredentials&gt;
              &lt;serviceCertificate findValue="localhost" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" /&gt;
            &lt;/serviceCredentials&gt;
            &lt;serviceSecurityAudit auditLogLocation="Application" serviceAuthorizationAuditLevel="Failure" messageAuthenticationAuditLevel="SuccessOrFailure" /&gt;
            &lt;dataContractSerializer maxItemsInObjectGraph="2147483647" /&gt;
            &lt;serviceThrottling maxConcurrentCalls="1500" maxConcurrentSessions="1500" maxConcurrentInstances="1500" /&gt;
          &lt;/behavior&gt;
          &lt;behavior name=""&gt;
            &lt;serviceMetadata httpGetEnabled="false" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
  
      &lt;services&gt;
        &lt;service behaviorConfiguration="MyServiceBehavior" name="SampleWCF.Services.Service1"&gt;
          &lt;endpoint address="" 
                    binding="netTcpBinding"
                    contract="SampleWCF.Services.Contracts.IService1"&gt;
            &lt;identity&gt;
              &lt;dns value="localhost" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="net.tcp://localhost:7860/Service1" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
  
        &lt;service behaviorConfiguration="MyServiceBehavior" name="SampleWCF.Services.Service2"&gt;
          &lt;endpoint address="" 
                    binding="netTcpBinding"
                    contract="SampleWCF.Services.Contracts.IService2"&gt;
            &lt;identity&gt;
              &lt;dns value="localhost" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="net.tcp://localhost:7860/Service2" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;      
      &lt;/services&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>The IIS end looks like this</p>
  
  <p><a href="https://i.stack.imgur.com/4kjBB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4kjBB.png" alt="enter image description here"></a>
  I have looked at related <a href="https://stackoverflow.com/questions/10311446/wcf-issues-with-wsdualhttpbinding-and-nettcpbinding-behind-firewalls">posts</a> for configurations but none seem to work.</p>
  
  <p>From this situation, these questions arise:</p>
  
  <ol>
  <li>What am I doing wrong?</li>
  <li>Which user should be used to access the database by the application pool?</li>
  </ol>