Hi,
when working with SharePoint 2013 / Online and CSOM how should time outs be handled correctly? For example when writing the following code:
using(ClientContext context = new ClientContext("https://mysharepoint-server/sites/somesite")) { context.RequestTimeout = 1000 * 60 * 3; // 3min time out try { Web web = context.Site.RootWeb; List list = web.Lists.GetByTitle("SomeList"); web.Context.Load(list); web.Context.ExecuteQuery(); return list; } catch(Exception ex) { // Lets assume the exception was caused by a time out of the request log.WarnFormat("List not available."); // Is it sufficient here to only ExecuteQuery() again, or must Load() calls the recalled also? //web.Context.Load(list); //web.Context.ExecuteQuery(); } }
My question is, if I only have to re-call ExecuteQuery() or are re-calls of all previous Load() calls are required as well.