Click here to Skip to main content
14,424,268 members
Rate this:
Please Sign up or sign in to vote.
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 :
<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.

<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 4:21am

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100