0

I have a WCF web service on a server. When I try to call this service from another server, I get a timeout exception after 20 seconds despite of the web.config settings.

Error Message:

The request channel timed out while waiting for a reply after 00:09:59.8593747.

When I try to call this service from localhost, it works without an exception.

Client web.config :

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IHostOlustur" 
                     receiveTimeout="00:10:00" sendTimeout="00:10:00" 
                     maxReceivedMessageSize="2147483647" />
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint name="BasicHttpBinding_IHostOlustur" 
            address="...."
            binding="basicHttpBinding" 
            bindingConfiguration="BasicHttpBinding_IHostOlustur"
            contract="Reseller.IHostOlustur" />
    </client>
</system.serviceModel>

Service web.config:

<system.serviceModel>
    <behaviors>
        <serviceBehaviors>
            <behavior name="">
                <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false"/>
                <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false" 
            multipleSiteBindingsEnabled="true" 
            minFreeMemoryPercentageToActivateService="1"/>
</system.serviceModel>

I think it's related to IIS settings.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Can we see the client and service configuration? Perhaps this might help [SO](http://stackoverflow.com/a/424386/2581562) – Legends Jun 25 '16 at 08:14
  • You have to add a ReceiveTimeout value to your service binding !!! and a SendTimeOut for your clientBinding (which you already have), then it should actually work, if you have set i up correctly. Can't see your service binding... – Legends Jun 25 '16 at 08:57
  • hm, it actually, you hit the 10min timeout, as stated in the exception. Don't think it has to do with IIS or your timeout settings. You don't receive a reply. Enable WCF logging and tracing... Download the appropriate windows sdk, there you have wcf trace and debug tools.. – Legends Jun 25 '16 at 09:00
  • @Legends I tried all of these combinations but didn't work. Something happened to client's server because it was working with same settings previously. Why it is working when doing request from localhost? If its related with web.config it shouldnt work from localhost, isnt it? – Burak Koray Balcı Jun 25 '16 at 09:05
  • when you try to call it from localhost , local website? from where do you call it ususally? I mean from where do you call it when get the timeout exception? Ah, when you deploy it to IIS, ok. Firewall? – Legends Jun 25 '16 at 09:06
  • Yes, if you can call it using the sam config from another place, then it must be soemthing else... – Legends Jun 25 '16 at 09:09
  • @Legends This problem started when client server restarted. – Burak Koray Balcı Jun 25 '16 at 09:21

0 Answers0