{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."}
-
2012. április 26. 17:32
Hi,
I have 100000 records in my server databse table, when i try to download data to local .sdf file its raise this error
{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."}
here is my code
LocalDataCache2SyncAgent syncAgent = new LocalDataCache2SyncAgent(); Microsoft.Synchronization.Data.SyncStatistics syncStats = syncAgent.Synchronize(); var localProvider = (ClientSyncProvider)syncAgent.LocalProvider; localProvider.ClientId = Guid.Parse("53406795-968f-4205-904d-12f7388316eb");
How can i overcome that error
Az összes válasz
-
2012. április 26. 23:01Moderátor
are you running on WCF?
if its SQL timing out, find InitializeCommands in the generated code and set the CommandTimeout in the Commands
-
2012. április 27. 4:20
MY application is asp.net MVC one, I have done this way
this.InsertCommand = new System.Data.SqlClient.SqlCommand();
this.InsertCommand.CommandTimeout = 500000;But still error is comming
lakmal
-
2012. április 27. 5:45Moderátor
have you set the timeout for all commands?
and btw, in your code above, you should be setting the ClientId before calling Synchronize(). setting it after you called Synchronize is useless as the sync has executed already.