Monday, March 14, 2011

"WebPage cannot be found" when uploading large file

So I had a client recently come to me with the following incident: "I am trying to upload the this file (.xls) to a sharepoint library, but then it says :'the webpage cannot be found'. I can open the document. No problem. I can upload other documents, no problem". So my first question is obviously: "How big is the document?" "44 megs", is the reply. "Send me that file...no, copy it to the shared location I will send to you. I will check it out".

Needless to say, I was thinking that this should not be a huge issue to solve. Surely it's just a setting somewhere in SharePoint Central Admin (SCA) - SPCA has already been taken - or in IIS.

But first, I need to see this for myself. I try to upload the file to a library, same error. After about 5 seconds, the "webpage cannot be found" error occurs. Cute, at least I know the user wasn't doing anything 'strange'. Now, time to check the logs... nothing of significance. Seriously. Uncool.

So I go about checking SCA Web Application General Settings. Maximum Upload Size is set to 50MB. Hmmm... Ok, let's check IIS. Seems like everything is cool here.  Check again, make sure I didn't miss anything. OK, now this has become a challenge.

Time to get onto Google... After a lot of searching, and running around in circles, I come across this article by Boris Gomiunik. Dude, hat off to you. Seriously.

Here's what you do. Open the web.config for your web application (notepad). Add the following lines to the end of the file, just before the </configuration> tag:

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="2147483648"/>
    </requestFiltering>
   </security>
</system.webServer>
That's it. Try your upload now. It just works. You might have to do an iisreset. Hope this helps.