views:

65

answers:

0

I go and setup a service reference to something like

http://localhost/myService/test.svc

However, it apparently does some magic and in the *.disco file (and elsewhere) it ends up with

http://mymachine.mydomain.com/myService/test.svc

I'm trying to understand why this happens.

Update: It seems they're trying to "help" but the IDE continues to give you the impression that you're connecting to localhost. In 99.9% of cases, it probably works out fine. In my case, I'm connecting to a service which checks its licenses against the domain name. Running against "localhost" is to be used for dev and test purposes.

The relevant portion of the *.config file ends up like this:

<system.serviceModel>
    <client>
        <endpoint address="http://mymachine.mydomain.com/myService/test.svc/Account"
            binding="wsHttpBinding"
            bindingConfiguration="WSHttpBinding_IAccount"
            contract="ServiceReference1.IAccount"
            name="WSHttpBinding_IAccount">
            <identity>
                <dns value="localhost" />
            </identity>
        </endpoint>
    </client>
</system.serviceModel>