tags:

views:

197

answers:

1

In my web.config, I have specified

<services>
      <service name="Querier.WCF.Querier"
       behaviorConfiguration="QuerierServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://myserver:8000/SearcherService"/&gt;
          </baseAddresses>
        </host>
        <endpoint address="net.tcp://myserver:9000/SearcherService"
                  binding="netTcpBinding"
                  bindingConfiguration="Binding1"
                  contract="Querier.WCF.IQuerier" />
      </service>
</services>

However, the site is not available at http://myserver:8000/SearcherService,

I for some reason have to go to:

http://myserver/SearcherService/SearcherService.svc (notice the port is missing)

When I go there, it tells me to run

svcutil.exe http://myserver.mycompanyname.com/SearcherService/SearcherService.svc?wsdl

It added a domain name for some reason and when I try to access the service with WCF storm, I put in http://mymachine/SearcherService/SearcherService.svc, it discovers all the function names fine, but when I try to run one, I get:

There was no endpoint listening at net.tcp://myserver:9000/SearcherService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Any ideas as to why my service URL doesn;t match what I specified in the web.config?

NOTE:

I have set nettcp on the app in IIS and enabled the binding on 9000:*

+1  A: 

When you host a WCF service in IIS it is IIS and its configuration who decides the base address for your service and you can only specify relative addresses. The baseaddress only applies to self hosted services.

Maurice
You can specify absolute addresses on the endpoint, but they have to match the base address of IIS+Application. For instance, if your application is hosted on server MyServer and the Application is MyApp, you could add an absolute endpoint like this:<endpoint address="net.tcp://myserver/myapp/fakesubdir/endpoint1" binding="netTcpBinding" bindingConfiguration="Binding1" contract="Querier.WCF.IQuerier" />
Ramiro Berrelleza