Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8921951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:41:45+00:00 2026-06-15T06:41:45+00:00

I have a application that consumes a WCF web service. I have it cofigured

  • 0

I have a application that consumes a WCF web service.

I have it cofigured to use a https binding. It works fine. I also wanted to add a HTTP binding to the same.

My requirement is if my client is on my domain (or on VPN) i need them to use the HTTP binding. and if they are external clients I want them to use HTTPS binding. How can I go about doing that? I am very new to WCF and this is my first try on it.

I have attached my Config File for reference. I did not know where to add the end point for the HTTP binding. Any help would be appriciated.

<system.serviceModel>
    <services>
      <service name="{service name}"
                behaviorConfiguration="httpsBehavior">
        <!--HTTPS END POINT-->
        <endpoint address=""
                  binding="basicHttpBinding"
                  bindingConfiguration="SecureHTTPBinding"
                  contract="{service contract}" />

    <!--METADATA ENDPOINT--> 
    <endpoint address="mex"
              binding="mexHttpsBinding"
              contract="IMetadataExchange" />
  </service>
</services>

<behaviors>
  <serviceBehaviors>
    <behavior name="httpsBehavior">
      <serviceMetadata httpsGetEnabled="true" httpsGetUrl="" />
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>

    <behavior name="httpBehavior">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>

  </serviceBehaviors>
</behaviors>

<bindings>
  <basicHttpBinding>
    <!--HTTPS BINDING-->
    <binding name="SecureHTTPBinding">
      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
    </binding>

    <!--HTTP BINDING-->
    <binding name="BasicHttpBinding">
      <security mode="None" />
    </binding>

  </basicHttpBinding>
</bindings>

EDIT : Adding netTCP Binding

<system.serviceModel>
    <services>
      <service name="{Service Name}"
                behaviorConfiguration="httpsBehavior">
        <!--HTTPS END POINT-->
        <endpoint address="https://localhost/Service1.svc"
                  binding="basicHttpBinding"
                  bindingConfiguration="SecureHTTPBinding"
                  contract="{Service Contract}"  name="httpsEndPoint"/>

    <!--METADATA ENDPOINT--> 
    <endpoint address="mex"
              binding="mexHttpsBinding"
              contract="IMetadataExchange" />

    <!--HTTP END POINT-->
    <endpoint address="http://localhost/Service1.svc"
              binding="basicHttpBinding"
              bindingConfiguration="HttpBinding"
              contract="{Service Contract}" name="httpsEndPoint"/>

    <!--TCP METATADATA END POINT-->
    <endpoint address="mextcp" binding="mexTcpBinding" contract="IMetadataExchange"/>
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:808/Service1.svc" />
      </baseAddresses>
    </host>

    <!--TCP ENDPOIN-->
    <endpoint address="net.tcp://localhost:808/Service1.svc" binding="netTcpBinding" contract="{Service Contract}" name="netTCPEndPoint" />



  </service>
</services>

<behaviors>
  <serviceBehaviors>
    <behavior name="httpsBehavior">
      <serviceMetadata httpsGetEnabled="true" httpsGetUrl="" />
      <serviceDebug includeExceptionDetailInFaults="true"/>
    </behavior>

  </serviceBehaviors>
</behaviors>

<bindings>
  <basicHttpBinding>
    <!--HTTPS BINDING-->
    <binding name="SecureHTTPBinding" allowCookies="true"
             maxReceivedMessageSize="20000000"
             maxBufferSize="20000000"
             maxBufferPoolSize="20000000">
      <readerQuotas maxDepth="32"
             maxArrayLength="200000000"
             maxStringContentLength="200000000"/>

      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
    </binding>

    <!--HTTP BINDING-->
    <binding name="HttpBinding" allowCookies="true"
             maxReceivedMessageSize="20000000"
             maxBufferSize="20000000"
             maxBufferPoolSize="20000000">
      <readerQuotas maxDepth="32"
             maxArrayLength="200000000"
             maxStringContentLength="200000000"/>
      <security mode="None" />
    </binding>

  </basicHttpBinding>

  <!--TCP BINDING-->
  <netTcpBinding>
    <binding transferMode="Buffered" />
  </netTcpBinding>

</bindings>

I am aware of the the possible Dos attacks wrt to the numbers in the code and I would work around it. For now just wanted to get it working. When I use this config file I run into error that says

Could not find a base address that matches the scheme net.tcp for the endpoint MetadataExchageTcpBinding. Registered base addresses are [http,https]

Can some one help me expose a net.tcp binding for my service.
Any help would be appriciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:41:47+00:00Added an answer on June 15, 2026 at 6:41 am

    Use netTcpBinding for your domain clients. Your network firewall will almost certainly block raw TCP traffic by default while letting in HTTP traffic, so it will naturally ensure that each client goes to the appropriate endpoint. You may very well get an extra performance boost for domain clients into the bargain.

    If you don’t want to do that (e.g. your WCF host doesn’t support it, or you have problems with VPN clients), then just expose one HTTPS endpoint for all clients regardless of location. The cost of SSL will be trivial compared to the overhead of doing a cross-network call in the first place.

    Background:

    • netTcpBinding transmits data in a compact binary format, which is more efficient than sending XML text over HTTP. The downsides are: it is not compatible with non-.NET clients, and you have to open specific ports on the firewall to let it through. Neither of those issues will be a problem for your scenario though.
    • You can expose any number of endpoints in a WCF service, as long as they all have unique distinct combinations of Address/Binding/Contract. You can therefore expose both HTTPS and TCP endpoints to the same service because they will have different Addresses and Bindings.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a WCF inspector in my client application that consumes numerous web
I have a Silverlight app that consumes a WCF service in my asp.net application.The
I have been working on a BlackBerry application that consumes web services from ColdFusion
I have WCF Service and my Android application consumes it. I am doing this
I have an application that is an asmx web service written in .NET 2.0
I am currently working on a WCF application that consumes a Rails REST Service.
I have developed an ASP.NET application that includes a WCF service. This service needs
I have a web service that will be consumed by some application (web site
I have a WCF service that's consumed via an iPhone application. All other methods
I'm trying to use WCF to consume a web service provided by a third-party's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.