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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:33:16+00:00 2026-05-16T01:33:16+00:00

Okay, I’ll try to make this as straight forward as possible. I’m using VB.Net

  • 0

Okay, I’ll try to make this as straight forward as possible. I’m using VB.Net in VS2010, I’m attempting to self-host a WCF service. (It’s actually in a windows service, but I’m trying to do this via a simple console app. Below is the code in question, the TCP/IP addresses are injected directly here. The WCF service itself is simply a renamed DEFAULT new WCF service project.

Dim host As New ServiceHost(GetType(TestService))

Dim tcpb As New NetTcpBinding()
tcpb.PortSharingEnabled = True
host.AddServiceEndpoint( _
    GetType(ITestService), _
    tcpb, _
    "net.tcp://localhost:62020/TestWcfService/" _
)

host.Open()

Console.ReadKey(True)

host.Close()

I don’t think I can make this much simpler.. is there something special I need to do to get the port to actually bind? when I run netstat -a it doesn’t show a listening port on 62020 I am really at my whits end on this.

Background: I have another WCF service I’m trying to migrate out of IIS, and into a separate server running in a Windows Service. The WCF service will only be accessed internally. I’ve been having numerous issues in getting that migrated, so trying to get a simple service to bind, and have a client (website) access it. The other WCF is binding (different port) fine, but having communications errors. There is a literal ****-ton of stuff out there, and very little really fits my needs, and I’m having a lot of trouble getting anything working with it.

  • 1 1 Answer
  • 1 View
  • 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-16T01:33:16+00:00Added an answer on May 16, 2026 at 1:33 am

    I just had the exact same problem when testing a new service. Turns out I had simply forgot to mark the service interface with the [ServiceContract] attribute. I guess WCF didn’t bother with creating an endpoint since no service contracts were found.

    Would have been nice with an error message since I can’t imagine anyone wanting to open a ServiceHost without at least one contract being implemented, but I suspect this only happens when you are using simplified configuration in .NET 4.

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

Sidebar

Related Questions

Okay, This may be really simple or it may not even be possible, or
Okay, so I'm trying to make a game that uses this algorithm: http://www.codeproject.com/Articles/15573/2D-Polygon-Collision-Detection But
Okay, I'm a little fuzzy on how this works or if it's possible. I
Okay, so I'm doing my first foray into using the ADO.NET Entity Framework. My
Okay i have this problem with every page i make. im not sure what
Okay, so this is complicated so try to bear with me, i will try
okay so this is probably a soft pitch question for sombody, but I want
Okay, I have done a bit of searching online and found this thread, but
Okay, before you guys go nuts -- this is just a small site, temporary
Okay people, I'm sure someone has had this issue and can help me out.

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.