0

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!

Carl
  • 1,224
  • 2
  • 19
  • 35
  • This problem really seems to be weird. If you have access to this SharePoint server, could you try to retrieve SchemaXml using Powershell, just for curiosity? Maybe it has some strange characters which can't be properly sent via CSOM? – Marek Kembrowski Jan 23 '14 at 07:03
  • 1
    @Marek : It indeed seems like there is an issue with the schema XML. I think there are some corrupted lists, since SharePoint Designer first opens correctly, but it then gives an error every time we try to open a list's settings (the view where you can see/edit the list's content types, workflows, etc.). I will answer the question as soon as we find what is causing the corruption. – Carl Jan 23 '14 at 14:26

0 Answers0