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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:41:38+00:00 2026-05-15T03:41:38+00:00

On a machine with multiple network cards I need to bind a WCF webservice

  • 0

On a machine with multiple network cards I need to bind a WCF webservice to a specific network interface. It seems that the default is to bind on all network interfaces.

The machine has two network adapters with the IPs 192.168.0.10 and 192.168.0.11. I have an Apache running that binds on 192.168.0.10:80 and need to run the webservice on 192.168.0.11:80. (Due to external circumstances I cannot choose another port.)

I tried the following:

string endpoint = "http://192.168.0.11:80/SOAP";
ServiceHost = new ServiceHost(typeof(TService), new Uri(endpoint));
ServiceHost.AddServiceEndpoint(typeof(TContract), Binding, "");
// or: ServiceHost.AddServiceEndpoint(typeof(TContract), Binding, endpoint);

But it doesn’t work; netstat -ano -p tcp always shows the webservice listening on 0.0.0.0:80, which is all interfaces (if I got that correct). When I start Apache first, it correctly binds to the other interface, which in turn prevents the WCF service to bind to “all”.

Any ideas?

  • 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-15T03:41:38+00:00Added an answer on May 15, 2026 at 3:41 am

    We are having a similar issue at my workplace, and was doing research for it when I stumbled upon your post. I haven’t gotten a chance to try it yet, but plan to when we get the chance: there is a “hostNameComparisonMode” on the Binding that, when set to “Exact”, is supposed to always obey your setting. (The default allows it to go to a wildcard if no match can be found.)

    If you get a chance to try this before I do, please let me know the results. Otherwise, I’ll update my answer and let you know!

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

Sidebar

Related Questions

What will the gethostname system call return on a machine with multiple network interfaces?
For a machine with multiple NIC cards, is there a convenient method in Java
I've this scenario, a Debian box running with multiple network cards: eth0 - Internet
I need a tool/script to fetch network card configurations from multiple Linux machines, mostly
I have a software system that performs OCR on Multiple machine simultaneously. Current system
A program is running on multiple machines that share a network drive. It can
I would like to distribute the data on multiple machines connected by TCP/IP network
I have got the requirement to find the core file in multiple box/machine and
Does running multiple Solr shards on a single machine improve performance? I would expect
I want to run multiple instances of apache on one single machine? How to

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.