Getting this error on some files, 99% of the files get downloaded as expected but some files give this error.
Only common thing I can find with these files is that they all have embedded images in them. (yet others with embedded image get downloaded correctly)
Public Function DownloadMsgfileFromSP(context As SP.ClientContext, oListitem As SP.ListItem) As String Try Dim finfo As SP.FileInformation = Microsoft.SharePoint.Client.File.OpenBinaryDirect(context, oListitem.Item("FileRef")) Dim fs As New FileStream(fpTempFileFolder + "TEMP.MSG", FileMode.Create) finfo.Stream.CopyTo(fs) fs.Close() fs.Dispose() finfo.Dispose() Return fpTempFileFolder + "TEMP.MSG" Catch Return "" End Try End Function
Thanks in advance.