Endpoint is not showing

I have a WCF Service where it has one endpoint and I have the service contract and operation contract setup in the config file but when I run the service, it cannot find the endpoint although I configured it in the web.config.

This service will be setup in IIS so I have no base address setup.

The ServiceContract has a configuration name of agent_port_type and the service behavior has a configuration name of agent_service. I am using basicHttpBinding.

Below is a copy of part of my config file:

 <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ETAOutboundServiceBehavior">
          <serviceMetadata httpGetEnabled="true"  httpsGetEnabled="true"  />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
        <behavior name="Metadata">
          <serviceMetadata httpGetEnabled="true"  httpsGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="ETAOutboundServiceBehavior" name="agent_service">
        <clear />
        <endpoint address="" name="agent_interface" binding="basicHttpBinding" contract="agent_port_type"
          listenUriMode="Explicit" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"
          listenUriMode="Explicit" />
      </service>
    </services>
    <protocolMapping>
        <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>    
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

Any help would be appreciated. I had it working on a different service fine but then I used svcutil to create agent_port_type and it is not working.


You should try simplifying the config to something that Works, then add extra options as need.

Start With:

  • Remove Clear tag
  • Remove all References to HTTPS
  • Remove listenURIMode

  • Add an address for the endpoint

  • Check the IIS log that you are calling the service that you think you are calling

  • Add a syntax error to Your config and check that it fails (to make sure that the config file you are editing is the one being used)
  • 链接地址: http://www.djcxy.com/p/87200.html

    上一篇: 无法配置端点

    下一篇: 没有显示端点