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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:42:02+00:00 2026-05-11T21:42:02+00:00

There’s so much stuff on this online but no one seems to be able

  • 0

There’s so much stuff on this online but no one seems to be able to answer this… Hopefully someone here will be!

So i have a WCF web service hosted at godaddy.com. Everything works great when i try accessing it using:

http://**www.**domain.com/DataService.svc

problem is when i remove the www i.e.

http://domain.com/DataService.svc

Here’s my web.config servicemodel section:

<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="DataServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service behaviorConfiguration="DataServiceBehavior"
      name="DataService">

    <endpoint address="" binding="basicHttpBinding" contract="IDataService"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>

Here’s my ServiceReferences.ClientConfig

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IDataService" maxBufferSize="2147483647"
                maxReceivedMessageSize="2147483647">
                <security mode="None" />
            </binding>
        </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://www.domain.ca/DataService.svc" binding="basicHttpBinding"
            bindingConfiguration="BasicHttpBinding_IDataService" contract="Web.IDataService"
            name="BasicHttpBinding_IDataService" />
    </client>
</system.serviceModel>

My service is using a CustomServiceFactory

public class CustomServiceHostFactory : ServiceHostFactory
{
    /// <summary>
    /// A custom method to eliminate multiple base addresses from the IIS host creation process
    /// </summary>
    /// <param name="serviceType">The service type to be created</param>
    /// <param name="baseAddresses">A list of the base addresses</param>
    /// <returns>A service host</returns>
    protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
    {
        if (baseAddresses.Length > 1)
        {
            ServiceHost customServiceHost =
                new ServiceHost(serviceType, baseAddresses[1]);
            return customServiceHost;
        }

        return new ServiceHost(serviceType, baseAddresses[0]);
    }
}

Basically what i would like is my WCF webservice to be reachable whether the user enters domain.com or http://www.domain.com into his (or her) browser.

Any help will be greatly appreciated!

ps. Running IIS 7 with ASP 3.5

Thnaks!
Simon

  • 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-11T21:42:02+00:00Added an answer on May 11, 2026 at 9:42 pm

    You’re running across a cross domain issue. See here for a list of reasons as to why it happens. As it turns out “www” and no-www are different domains even though they don’t seem like it. You’ll need to add a cross domain file. See Tim’s blog for good info

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

Sidebar

Related Questions

There are nice SO question and answers about this issue, but these options didn't
There have been multiple questions regarding this topic but I have never really settled
There are plenty of questions and answers to this like this question but I
There is a column that exists in 2 tables. In table 1, this column
There's a Rails 3.2.3 web application which doesn't use any database. But in spite
There are two table s : one is the master and one the detail
There's a few previous questions on StackOverflow questioning how one goes about accessing local
There is this strange situation I'm fighting on. I have 3 pages, les call
There is no doubt that MonoTouch is one of the great cross-compiler(s). Similarly, SenchaTouch
There are 2 websites. Mine and a clients. The client needs to be able

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.