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

  • Home
  • SEARCH
  • 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 6968397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:26:47+00:00 2026-05-27T16:26:47+00:00

I am confused about the castle wcf facility registration. I read some blog posts

  • 0

I am confused about the castle wcf facility registration.

I read some blog posts for BasicHttpBinding.
But could not find a clear easy sample to setup a net.tcp setup.

I want to host the service from a console application…

I wrote something like this… can you see a problem here?

_container = new WindsorContainer();
_container.AddFacility<WcfFacility>();

_container.Register(Component.For<IMembershipService>().ImplementedBy<MembershipService>()
    .AsWcfService(
        new DefaultServiceModel()
            .AddEndpoints(WcfEndpoint
                    .BoundTo(new NetTcpBinding() { PortSharingEnabled = false })
                    .At("net.tcp://localhost/MembershipService")
            )
            .PublishMetadata()
    )
);
  • 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-05-27T16:26:48+00:00Added an answer on May 27, 2026 at 4:26 pm

    If you wish to publish metadata you will need to enable port sharing (to let the MEX endpoint share the same port as the regular TCP port – you’ll get an AddressAlreadyInUse exception if you have this set to false) and you probably need to specify a port on your URL (not sure what port TCP would use otherwise), so your code should be (assuming port 8080 is OK for you):

    _container.Register(Component.For<IMembershipService>().ImplementedBy<MembershipService>()
        .AsWcfService(
            new DefaultServiceModel()
                .AddEndpoints(WcfEndpoint
                        .BoundTo(new NetTcpBinding() { PortSharingEnabled = true})
                        .At("net.tcp://localhost:8080/MembershipService")
                )
                .PublishMetadata()
        )
    );
    

    This works fine using castle windsor 3.0.

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

Sidebar

Related Questions

I'm a bit confused about inheritance under sqlalchemy, to the point where I'm not
I'm a bit confused about the right way to write a code. I read
I'm confused about facebook and whether or not facebook is an openid provider like
I'm a bit confused about how an object could be edited with Spring Forms,
I am a newbie to NHibernate and a bit confused about Castle, LinFu and
Very confused about this one. This code in views.py works, but only when I'm
I'm confused about Content and Remove items in a List. Can someone teachme some
I am using Nhibernate but still i am confused about (lazy-loading and Eagerly loading)
I'm really confused about this, but when I'm trigging a thread from my SurfaceView,
I'm a bit confused about how many controllers I need, and when I can

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.