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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:09:12+00:00 2026-05-17T20:09:12+00:00

Maybe I’m just not getting it, but I have a service that is deployed

  • 0

Maybe I’m just not getting it, but I have a service that is deployed to an IIS 6 machine. That machine has a LAN address and a Public internet address.

How on earth am I supposed to be able publish this service with both accessible?

  • Address 1: http://serverName/ServiceName/Service.svc
  • Address 2: http://www.companyName.com/ServiceName/Service.svc

At first I thought: No big deal, 2 endpoints. So I have

<endpoint 
    address="Address 1" 
    binding="wsHttpBinding" 
    bindingConfiguration="DefaultBindingConfiguration" 
    name="RemoteEndpoint" />

<endpoint
    address="Address 2" 
    binding="wsHttpBinding" 
    bindingConfiguration="DefaultBindingConfiguration" 
    name="LocalEndpoint" />

The client code then looks like:

public void createServiceProxy()
{
    if (Util.IsOperatingLocally())
        this.proxy = new ProxyClient("LocalEndpoint");
    else
        this.proxy = new ProxyClient("RemoteEndpoint");
}

No dice. Can’t add the service reference.

No protocol binding matches the given address ‘Address 1’. Protocol bindings are configured at the Site level in IIS or WAS configuration.

Then I thought: Maybe the host tag and its dns tag will help. Nope, that’s for authentication.

Then I thought: I’ll use net.tcp for the local endpoint. Oops… IIS 6 doesn’t support net.tcp.

Then I thought: I know, the ProxyClient constructor takes a remoteAddress string as its second parameter. Now it’ll look like:

<endpoint
    address="" 
    binding="wsHttpBinding" 
    bindingConfiguration="DefaultBindingConfiguration" 
    name="MyEndpointName" />

public void createServiceProxy()
{
    if (Util.IsOperatingLocally())
        this.proxy = new ProxyClient("MyEndpointName", "Address 1");
    else
        this.proxy = new ProxyClient("MyEndpointName", "Address 2");
}

Apparently not. When trying to instantiate the ProxyClient…

Could not find endpoint element with name ‘MyEndpointName’ and contract MyService.IService’ in the ServiceModel client configuration section.

Which leads me to the app.config whose generated client section looks like this:

<client>
    <endpoint address="http://localhost:3471/Service.svc" binding="customBinding"
        bindingConfiguration="MyEndpointName" contract="MyService.IService"
        name="MyEndpointName">
        <identity>
            <userPrincipalName value="DevMachine\UserNa,e" />
        </identity>
    </endpoint>
</client>

Which sure doesn’t look right to me.

My next thought is not a healthy one. Please help.

  • 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-17T20:09:13+00:00Added an answer on May 17, 2026 at 8:09 pm

    Here’s what I do:

    PortClient client = new PortClient(); // from the service reference
    
    EndpointAddress endpointAddress;
    
    if (local)
        endpointAddress = new EndpointAddress("http://local/Service.svc");
    else
        endpointAddress = new EndpointAddress("http://remote/Service.svc");
    
    client.ChannelFactory.CreateChannel(endpointAddress);
    client.RemoteMethod();
    

    etc.

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

Sidebar

Related Questions

No related questions found

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.