Click here to Skip to main content
15,887,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We have a WCF Service which is used by External Clients to call some methods inside it.

Most of time they don't have any issue but sometimes, they are getting below error

There was no endpoint listening at http://abcd.net/xyzAPI/pqrs.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.-inner:The remote server returned an error: (404) Not Found

WCF Config :
HTML
<system.serviceModel>
    <serviceHostingEnvironment  minFreeMemoryPercentageToActivateService="0" />
    <services>
      <service behaviorConfiguration="UUCPAPIServer.UUCPAPIServerBehavior"
        name="UUCPAPIServer.UUCPAPIServer">
        <clear />
        <endpoint address="http://abcd.net/xyzAPI/pqrs.svc" binding="basicHttpBinding" bindingConfiguration="Basic"
          name="Basic" contract="UUCPAPIServer.IUUCPAPIServer" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="UUCPAPIServer.UUCPAPIServerBehavior">
          <serviceMetadata httpGetEnabled="true" 		httpGetUrl="http://abc.net/xyzAPI/pqrs.svc/basic"/>
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceThrottling maxConcurrentCalls="150" maxConcurrentSessions="500" />
          <dataContractSerializer maxItemsInObjectGraph ="2147483647"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>        
        <binding name="Basic" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
            maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding >
      </basicHttpBinding>
      
    </bindings>    

  </system.serviceModel>

Client Developed application using C#4.0: Below is client config file.

HTML
<system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="Basic" />
               
            </basicHttpBinding>
          
        </bindings>
        <client>
          <endpoint address="http://abcd.net/xyzAPI/pqrs.svc"
                binding="basicHttpBinding" bindingConfiguration="Basic" contract="IntigralServiceClient.IUUCPAPIServer"
                name="Basic" />
          
        </client>
    </system.serviceModel>


Please let me know any changes in configuration file will help me in avoiding the intermidtae 404 error that my client is facing.

Thanks,
KHB
Posted
Updated 14-Jul-17 3:21am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900