+ Start a Discussion
grrepITgrrepIT 

System.Net.WebException: The operation has timed-out.

Hi,

we have a need to update 1 million records to Salesforce database. We are trying to use webservice and trying to send 200 objects at a time. Then we are getting the below error

' System.Net.WebException: The operation has timed-out.'

C:\Inetpub\wwwroot\test\SalesForceSystem\SalesForceSystem\SalesForceSolution\SalesForce\Web References\sforce\Reference.cs    Line: 160

How can we update if this problem persisting?

Please advice.

Thanks,




 

 

SuperfellSuperfell
Make your timeout bigger, there's a Timeout property on the WS proxy object.
grrepITgrrepIT

What is the max size we can use for update objects array with enterprise edition?

 

Thanks,

 

SuperfellSuperfell
200 at a time.
grrepITgrrepIT

I have increased the session time to 4 hours through settings from Enterprise. But still I was getting disconnected from the server and getting an error 'DNS not found'.

Thanks,

 

darozdaroz

grrepIT wrote:

I have increased the session time to 4 hours through settings from Enterprise. But still I was getting disconnected from the server and getting an error 'DNS not found'.



The DNS not found error makes me lean more toward your internet connectivity as the issue here. While I'm sure SFDC isn't perfect, and they don't have 100% uptime, I've never seen a DNS error that wasn't connectivity related. (And outside of their control)
grrepITgrrepIT

when we are using the windows application with which we have used the logic for web application , then we are getting the below message.

An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll

Additional information: UNKNOWN_EXCEPTION: size of request is too large

But it was working with web application with object size of 200.

Please advice

 

 

SuperfellSuperfell
That error indicates that you are sending a SOAP request larger than 50Mb, which isn't allowed.
grrepITgrrepIT

While updating I am sending the data for id,account id and two more date fields with batch size of 200.

As you suggested I have increased the time to 4 hours at enterprise salesforce settings. Also I have converted my web application to windows application now. But still I was getting this error frequently.

Here is the messahe I was getting

***************************************************************************************************************

System.Net.WebException: The operation has timed out
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at SalesForceAPI.sforce.SforceService.update(sObject[] sObjects) in C:\Temp\SalesForceAPI\SalesForceAPI\Web References\sforce\Reference.cs:line 477
   at SalesForceAPI.Components.BusinessLogicLayer.SFUpdate.UpdateSFSInitDate(DataSet data, String url, String id) in C:\Temp\SalesForceAPI\SalesForceAPI\Components\BLL\SFUpdate.cs:line 43

***********************************************************************************************************

SuperfellSuperfell
Have you changed the default timeout on the generated .NET proxy, e.g.

sforce.SforceService svc = new sforce.SforceService();
svc.Timeout = 600000;
grrepITgrrepIT
I have made service timeout to infinite.
SuperfellSuperfell
Not if you're getting timeout exceptions.