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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:25:52+00:00 2026-05-11T16:25:52+00:00

I have a WCF service that I am deploying in a shared hosting environment.

  • 0

I have a WCF service that I am deploying in a shared hosting environment. Because of this I have to specify baseAddressPrefixFilters (see answer here for why this is necessary). Setting the base address prefix filters happens in the web.config like so…

<serviceHostingEnvironment>
  <baseAddressPrefixFilters>
    <add prefix="http://example.com"/>
  </baseAddressPrefixFilters>
</serviceHostingEnvironment>

The problem is that I have multiple environments that are configured this way with their own urls (i.e. dev, test, prod)

I tried the following with no luck…

<serviceHostingEnvironment>
  <baseAddressPrefixFilters>
    <add prefix="http://dev.example.com"/>
    <add prefix="http://test.example.com"/>
    <add prefix="http://example.com"/>
  </baseAddressPrefixFilters>
</serviceHostingEnvironment>

So the question is how do I set the baseAddressPrefixFilter dynamically at runtime?

  • 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-11T16:25:53+00:00Added an answer on May 11, 2026 at 4:25 pm

    If you are running under IIS7, this is a good walk through of the problem and solution. If not, the information for the WCF side is still what you need to know to resolve your issues.

    http://keithelder.net/2008/04/28/configuring-wcf-and-iis-7-with-http-bindings-and-multiple/

    Have you looked at the ServiceHostFactory? We used this in our 3.0 services to work with the different host headers.

    http://blogs.msdn.com/rampo/archive/2007/06/15/supporting-multiple-iis-bindings-per-site.aspx

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

Sidebar

Related Questions

I have a WCF service that is deployed on a machine. This WCF service
I have a WCF service that uses UserName authentication via ACS. This works great
I have WCF service that uses wsHttpBinding and authentication with certificate. I run this
I have a wcf service that I am hosting within a windows service on
I have a WCF service that returns JSON to the clients. This is the
I have a WCF service that works ok if I create the service without
I have a WCF service that posts messages to a private, non-transactional MSMQ queue.
I have a WCF service that is returning a block of xml. One element
I have a WCF service that is performing some updates across a couple of
I have a wcf service that uses the .net System.AddIns framework to load assemblies

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.