SOLVED

File corruption on migration from SharePoint 2010 to 2019

Copper Contributor

Hello Community,

 

I'm doing a big migration of a personnalized SharePoint 2010 Web Application. I managed to migrated to 2013 and 2016 without any issues. But my final step from 2016 to 2019 make some of my PDF files to not be able to be view or download. The files seem to be corrupted. In the browser I get a "This PDF document might not be displayed correctly" and when I download the file to open it locally I got an error message telling me that the file may be corrupted or not the good version for my viewer. I have the same behavior in IE, Chrome, Firefox ... so I guess that the files are really corrupted in the DB.

 

I have access to a fonctionnal 2016 DB, so community .... any idea for me??

 

Thank you all and have a nice day :)

 

6 Replies

Did a re-upgrade produce the same results?

I'm assuming prior to upgrading to 2016, you did an Upgrade-SPSite as well as switched to a claims provider (if not using claims in 2010)?

 

Have you tried downloading the file from SharePoint using PoSh on the server?

 

$web = Get-SPWeb https://webApp/sites/siteCollection
$file = $web.GetFile('libraryName/myFile.pdf')
$bytes = $file.OpenBinary()

$fs = New-Object System.IO.FileStream('C:\myFile.pdf', 'Create')
$bw = New-Object System.IO.BinaryWriter($fs)
$bw.write($bytes)
$bw.Close()

@Trevor SewardThank you for the reply!

I'm effectively in claims based since 2010. I tried your little code on my 2019 server and it work!! But I'm not sure what to do next?

 

Again, thank you for your help :)

If the PoSh worked, that means the file isn't corrupted. Are you going through a load balancer or any other network device/filtering service prior to reaching SharePoint?

Can you open the PDF from SharePoint using Chrome, Edge, Adobe Reader, or Foxit?

@Trevor Seward 

No, I'm not using any network filtering, I'm in a localhost setup, SharePoint, SQL, etc., all on the same server. I'm figure after your little test that I can go in the Document library and manually download the files, but I can't use the Title link. I have the same issue in all browser.

 

I'm working on a work around ... Creating a new library, moving all the stuff there and renaming it as the initial library.

I'm realizing that the only files that is not working properly all have accent like "è, é, à" and all that is working dont have those.

 

BTW, I managed to copy all files but I couldn't delete the library, it's Documents, a system library. Maybe there is a yay but anyway the new files in the new library have the same issue.

 

So now I'm searching why I have accent issue.

best response confirmed by RousseauNC (Copper Contributor)
Solution

Found it!!!

 

I just needed to enable ''Allow high-bit characters'' in my IIS Web Site in the Request Filtering option.

 

Source : StackOverflow

 

Thanks a lot for your help, you help me looking at a different place and it unstuck me.

1 best response

Accepted Solutions
best response confirmed by RousseauNC (Copper Contributor)
Solution

Found it!!!

 

I just needed to enable ''Allow high-bit characters'' in my IIS Web Site in the Request Filtering option.

 

Source : StackOverflow

 

Thanks a lot for your help, you help me looking at a different place and it unstuck me.

View solution in original post