I have a WCF service that I am connecting to in a Silverlight project. The task that the service should complete takes more than a minute (this is normal), but I get an error message. I communicate with him through a proxy (created by dev studio when adding a link to the service)
The HTTP request to 'http://localhost/ImporterService.svc' has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout.
(where ImporterService is my service)
I read all kinds of messages over the past 3 days about raising the next one.
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
openTimeout="00:10:00"
closeTimeout="00:10:00"
Nothing worked, it still expires in 1 minute!
Ok, so in the generated ServiceReferences.ClientConfig file, I added the values to the following location
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ImporterService" maxBufferSize="2147483647"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
openTimeout="00:10:00"
closeTimeout="00:10:00"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
....
This timeout appears on the client side (for example, I can do this by adding a 1-minute sleep in the service code)
Question1
, , .
, web.config
web.config
inside the existing <basicHttpBinding> as shown below
><basicHttpBinding>
><binding name="downloadBinding" maxReceivedMessageSize="2000000" maxBufferSize="2000000">
><readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000" />
></binding>
>
><binding name="BasicHttpBinding_IImporterService" maxBufferSize="2147483647"
>receiveTimeout="00:10:00"
>sendTimeout="00:10:00"
>openTimeout="00:10:00"
>closeTimeout="00:10:00"
>maxReceivedMessageSize="2147483647">
><security mode="None" />
></binding>
>
></basicHttpBinding>
></bindings>
. BasicHttpBinding_IImporterService ( , , ,
I also have <httpRuntime executionTimeout set to a huge value.
- . 1 .
,
1. What an I doing wrong, am I putting these settings in the wrong place?
2. Is it just client side I need to do
3. Perhap it can be done in code if these config settings don't work
, ,
ImporterServiceClient importerService = new ImporterServiceClient("*", new >EndpointAddress(ServicePath));
, , , , , , , ?
. , , - ( , config, -, )!
,