Thursday, May 16, 2019

Any cure for Microsoft.SharePoint.Client.File not playing nicely with [MS] Serialization.JavaScriptSerializer() ?

​

 ' Stuff....... Dim uploadedFile As Microsoft.SharePoint.Client.File = theFolder.Files.Add(fileInfo) ' Stuff....... return New System.Web.Script.Serialization.JavaScriptSerializer().Serialize(uploadedFile) ' Stuff....... 

​

Exception:

The property or field 'Email' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.

​

Hahahahahaha!

Rather than "nothing", an EXCEPTION is raised when accessing something which should be treated as a property?

Meaning I can't just throw the object to the JSON serialiser, because there's no way of handling the exceptions via the serialiser itself, the process ends, and the exception is passed out - leaving the serialisation unfinished.

Any cure for Microsoft.SharePoint.Client.File not playing nicely with [MS] Serialization.JavaScriptSerializer() ? Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team