One of our clients gets an error from SharePoint (2013) with our tool when it tries to load the lists from the SharePoint site. Our tool uses the Client Object Model and it loads the lists with the following code:
context.Load(
context.Web.Lists,
coll =>
coll.Include(
x => x.Id,
x => x.Title,
x => x.BaseType,
x => x.BaseTemplate,
x => x.TemplateFeatureId,
x => x.Hidden,
x => x.IsCatalog,
x => x.HasExternalDataSource,
x => x.RootFolder.ServerRelativeUrl,
x => x.EnableVersioning,
x => x.EnableMinorVersions,
x => x.EnableModeration,
x => x.ForceCheckout,
x => x.EnableAttachments,
x => x.DefaultViewUrl,
x => x.SchemaXml));
context.ExecuteQuery();
Basically, this code loads some properties from all the lists in the site. It works well with our environment as well as with all our other clients' environment. For some reason however, this client's SharePoint site returns the following error:
ErrorCode=-2130575312 ErrorMessage=Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file. ErrorTypeName=Microsoft.SharePoint.SPException TraceCorrelationId=a0c66c9c-4950-0052-b533-fc908801a27a
I have looked at the ULS logs and there is no entry with the above correlation ID. There is no error either around the time where the request was sent/processed (I checked everything from 30 seconds before the request to 30 seconds after the response). I have also confirmed that the user has access to the lists and that it is not a permission issue.
I have searched around a bit and I have not found anything that could explain this error. Any ideas?
UPDATE
I have identified that the error only happens when loading the SchemaXml, it does not happen when it is not requested. I'm not sure why this would make it fail though.
Thanks in advance!