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 7942435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:58:11+00:00 2026-06-03T23:58:11+00:00

I’m watching a webcast on WCF, and it has two endpoints defined in the

  • 0

I’m watching a webcast on WCF, and it has two endpoints defined in the app.config, one netTcpBinding and one mexHttpBinding.

It also has two base addresses, net.tcp://localhost:9000 and http://localhost:8000.

I’m wondering how it associates those base addresses with the endpoints. Since your endpoint specifies tcp or http, why are the base addresses prefixed with net.tcp and http?

If WCF uses net.tcp base addresses with netTcpBinding endpoints, what happens if you have two tcp endpoints that listen on 9000 and 9001, what would you put into the config to stop the conflict?

  • 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-03T23:58:12+00:00Added an answer on June 3, 2026 at 11:58 pm

    I’m wondering how it associates those base addresses with the
    endpoints.

    Per protocol.

    When you define service endpoints, you can give relative or absolute addresses for the endpoints, if you give an absolute endpoint address then the base addresses will not be used to generated the actual endpoint address, however if you give a relative address
    in your endpoint then a combination of your base address and relative address will be used to generated the final endpoint address.

    A relative endpoint address is like this for example:

      <endpoint address="/hostHttp"  binding="wsHttpBinding"  contract="IMyService" />
      <endpoint address="/hostNetTcp"  binding="netTcpBinding"  contract="IMyService" />
    

    Now WCF will generate the actual endpoint address using your base address that you defined per protocol:

    <baseAddresses>
                <add baseAddress="http://localhost:8550/MyServiceHost/Service"/>
                <add baseAddress="net.tcp://localhost:8551/MyServiceHost/Service"/>
    </baseAddresses>
    

    So your HTTP endpoint address will ultimately be:

    http://localhost:8550/MyServiceHost/Service/hostHttp
    

    and your netTcp endpoint:

    net.tcp://localhost:8551/MyServiceHost/Service/hostNetTcp
    

    Now if you have another protocol defined, and you haven’t defined an absolute address in your endpoint, WCF will look for the base address defined for that particular protocol, and generate an endpoint using the base address.

    If WCF uses net.tcp base addresses with netTcpBinding endpoints, what
    happens if you have two tcp endpoints that listen on 9000 and 9001,
    what would you put into the config to stop the conflict?

    I think it would be best to give absolute adresses in ypour endpoints in this instance:

    <endpoint address="net.tcp://localhost:9000/MyServiceHost/Service"
                       binding="netTcpBinding"
                       contract="IMyService" />
    
    <endpoint address="net.tcp://localhost:9001/MyServiceHost/Service"
                       binding="netTcpBinding"
                       contract="IMyService" />
    

    As mentioned previously when you provide absolute addresses then your base addresses won’t be consulted in generating an endpoint address.

    You may want to have a look at this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
In my XML file chapters tag has more chapter tag.i need to display chapters
We're building an app, our first using Rails 3, and we're having to build

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.