Link to home
Start Free TrialLog in
Avatar of abdallah1973
abdallah1973

asked on

Upload error When upload large file to sSarePoint 2013

Hi guys,

I have created the following code to read a file from SQL database, copy it to C drive and then upload to SharePoint 2013. The file uploaded if it's less or equal to 300 MB but if it's over is provide the following error.

4/15/2018 2:23:32 PM:    Error Message :: Object reference not set to an instance of an object.Error StackTrace ::    at PP.WindowService.PPSPSync.PMWebSPSync.UploadDocument(String siteURL, String documentListName, String documentListURL, String documentName, Byte[] documentStream, Int64 DocumentTypeId, String ProjectNumber, Int64 DocumentId, Int64 FileContentId, Int64 PhaseID, String FilePath, String LocalFileName) in D:\v24\pp.WindowService.PSPSync\PMWebSPSync.cs:line 466
   at PP.WindowService.PPSPSync.PMWebSPSync.ProcessData(DataRow row) in D:\v24\PP.WindowService.PPSPSync\PPSPSync.cs:line 591


What is the solution?
PPSync2.cs
Avatar of noci
noci

Best guess.... There is a limit on filetransfers of 300MB somewhere (IIS? Sharepoint?, ISAPI?...)  causing the filetransfer to abort halfway.
the transfer layer deletes the partial file and returns. The next step doesn't validate if the filetransfer was completed or not but just starts to process the file.... which is not there (giving an invalid object reference).  
Try to find what the upload/download limits for this installation is.
Avatar of abdallah1973

ASKER

i still check your observations
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.