The HTTP request to *.svc has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout.
Solution 1
I imagine the issue is not that your ReceiveTimeout is beyond the maximum value for that setting, as the MaxValue of a TimeSpan is over 10 million days. Instead, I think the settings are just not taking effect.
You should try increasing the timeout values on both the server and the client-side:
On the server (in your web.config)
<binding name="customBinding0" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">
On the client (in your ServiceReferences.ClientConfig)
<binding name="CustomBinding_DesignOnDemandService" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">
Solution 2
The HTTP request to has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout.
Three places to set time values to fix this issue…
Web.Config
<httpRuntime executionTimeout="600" />
(this is seconds, so here it’s 10min). More info on httpRuntime here.
On your Web.Config Binding Elements
<binding name="customBinding123" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00" />
On your ServerReferences.ClientConfig binding elements within the system.serviceModel
<binding name="CustomBinding" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00" />
Solution 3
Some days ago we got the same error message. I found this thread, but before we started to increase the different timeout properties, we checked the antivirus software of the client machine: it was NOD. The newer NOD (and maybe other AVs) has port filter/block possibility. We turned off the 80/443 port blocking, and the client connected without any timeout error message.
Md. Shadikul Islam
Updated on September 30, 2020Comments
-
Md. Shadikul Islam over 3 years
I have been developing a Silverlight application using WCF.
The problem is that sometimes it throws an exception stating:
"The HTTP request to 'http://localhost:1276/Foo.svc' has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout."
So how do I increase the timespan? Some have suggested the usage of receive time out as below in web config and in service.client config file
<bindings> <customBinding > <binding name="customBinding0" receiveTimeout="02:00:00" > <binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647" maxSessionSize="2147483647" /> <httpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Buffered"/> </binding> </customBinding> </bindings>
what would be the maximum value for the receiveTimeout property?
-
maplemale almost 10 yearsAll bindings in web config, client config as well as the executionTimeout are set to 10 minutes, yet I still get the timeout at exactly 1 minute.
-
Haseeb over 3 yearsExactly happened with me, I changed the setting in web.config and it was not reflecting. the reason was my application was setting values from its own setup file "not from web.config"