views:

996

answers:

1

I have a WCF service hosted in IIS7 with netTCP enabled.

This is my web.config in %apppath%\ , where the SVC file is.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <services>
      <service name="Search.Querier.WCF.Querier" behaviorConfiguration="SearcherServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8050/SearcherService"/&gt;
          </baseAddresses>
        </host>
        <endpoint address="net.tcp://localhost:9000/SearcherService"
                  binding="netTcpBinding"
                  bindingConfiguration="Binding1"
                  contract="Search.Querier.WCF.IQuerier" />
      </service>
    </services>
    <bindings>
      <netTcpBinding>
        <binding name="Binding1"
                     hostNameComparisonMode="StrongWildcard"
                     sendTimeout="00:10:00"
                     maxReceivedMessageSize="65536"
                     transferMode="Buffered"
                     portSharingEnabled="false">
          <security mode="None">
            <transport clientCredentialType="None" />
            <message clientCredentialType="None" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SearcherServiceBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
          <serviceDebug includeExceptionDetailInFaults="true"  />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.web>
    <compilation debug="true" />
  </system.web>
</configuration>

For some reason, instead of loading on port 8050 as I specified, I see the blue and beige site showing the site at:

http://localhost/SearcherService/searcherservice.svc and not http://localhost:8050/SearcherService/searcherservice.svc

Additionally, when I try to run

svcutil.exe http://process.mycomp.com/SearcherService/SearcherService.svc?wsdl

as the page rendered on the URL says, I get an error:

Metadata contains a reference that cannot be resolved: 'http://process.mycomp.com/SearcherService/SearcherService.svc?wsdl'

But I have that specified nowhere else in my web.config

Is there anywhere else it could be?

+2  A: 

You are missing a MEX endpoint, have a look at this link:

http://bloggingabout.net/blogs/dennis/archive/2006/11/09/WCF-Part-4-%5F3A00%5F-Make-your-service-visible-through-metadata.aspx

Shiraz Bhaiji