title: Can't find net.tcp endpoint in add service reference in WCF?
body: <p>I have common issue with WCF and net.tcp binding.
  I saw all posts on stackoverflow also googling too..</p>
  
  <p>The main problem that I can't add Service Reference to my client.
  I get error:</p>
  
  <pre><code>Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]. 
  </code></pre>
  
  <ol>
  <li><p>I'm using IIS 7. I checked non-HTTP.I added to web site in Enable Protocols net.tcp, also added net.tcp to bindings. If I click on browse(http) my address. I see my folder with WCF application, and if I select svc file I see normal address:</p>
  
  <p>svcutil.exe net.tcp://MYADDRESS/Service.svc/mex</p></li>
  </ol>
  
  <p>I guess that I set my IIS correctly if I see this URL!!</p>
  
  <p>But problem starts when I try to add reference to client. Only that I see http endpoints and no net.tcp.</p>
  
  <p>That's my config on service:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  
        &lt;appSettings&gt;
          &lt;add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /&gt;
        &lt;/appSettings&gt;
        &lt;system.web&gt;
          &lt;compilation debug="true" targetFramework="4.5" /&gt;
          &lt;httpRuntime targetFramework="4.5"/&gt;
        &lt;/system.web&gt;
        &lt;system.serviceModel&gt;
          &lt;services&gt;
            &lt;service name="MYSERVICE.SERVICE" behaviorConfiguration="behavior1"&gt;
              &lt;endpoint 
                        binding="netTcpBinding"
                        contract="MYSERVICE.ISERVICE"&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:60745/MYSERVICE/SERVICE/"/&gt;
                &lt;/baseAddresses&gt;
              &lt;/host&gt;
            &lt;/service&gt;
          &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="behavior1"&gt;
            &lt;serviceMetadata httpGetEnabled="false" httpsGetEnabled="false"/&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;protocolMapping&gt;
          &lt;add binding="netTcpBinding" scheme="net.tcp" /&gt;
      &lt;/protocolMapping&gt;    
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
      &lt;directoryBrowse enabled="true"/&gt;
    &lt;/system.webServer&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Note: my web site starts from 60745 address, but for net.tcp binding in IIS I added 60746:*
  Also I opened Inbound Outbound rules for both ports.</p>
  
  <p>Thank you!</p>