Search code examples
c#asp.netwcfweb-configwcf-binding

WCF Service End Point Not Found


i have deployed my wcf service on IIS.. Its giving me this error when I want to access its one of method "EndPoint Not Found" While locally its working fine for me and returning me data.

Here is my Web.config Bindings Information

 <system.webServer>
    <directoryBrowse enabled="false" />
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  <system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <services>
      <service name="RTAService" behaviorConfiguration="WtfServiceBehaviour">
        <endpoint address="" binding="webHttpBinding" bindingConfiguration="wtfSslBinding" behaviorConfiguration="WebHttpBehaviour" contract="IRTAService" />
        <endpoint address="soap" binding="basicHttpBinding" contract="IRTAService"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"  />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="wtfSslBinding" />
        <binding name="streamedBinding"
                 maxBufferSize="65536"
                 maxReceivedMessageSize="2000000000"
                 transferMode="Streamed">
          <readerQuotas maxDepth="500000000"
         maxArrayLength="500000000" maxBytesPerRead="500000000"
         maxNameTableCharCount="500000000" maxStringContentLength="500000000"/>
          <security mode="None" />
        </binding>

      </webHttpBinding>
    </bindings>
    <behaviors>
      <endpointBehaviors>
        <behavior name="WebHttpBehaviour">
          <webHttp helpEnabled="true" defaultBodyStyle="Wrapped" defaultOutgoingResponseFormat="Json"
            automaticFormatSelectionEnabled="false" />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="WtfServiceBehaviour">
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

Please tell me any work around for that.


Solution

  • I dont see endpoint defined any where . Your config should have something like this.`

      <endpoint address="http://localhost:57800/Services.svc" binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_IServices"     contract="MYServices.IServices"
                name="BasicHttpBinding_IServices" />