Home
Our Work
Services
Small Business Intranet
Samples
Training
SharePoint
Hosting
  

dbWeb > Blogs > Bryan Worthy > Categories
SharePoint File Upload Size Limit

WSS / MOSS File Upload Size and Timeout Issue (Server 2008 & IIS 7)

 

http://donpistulka.spaces.live.com/blog/cns!1351C78C5D7326F4!1010.entry
(I got this article from here but I always had to search for it. I thought it would be easier to find if I put it on my own blog).

   

If you need to increase the maximum file upload size on your SharePoint site the first place you'll probably check is Central Administration. There's a Maximum Upload Size setting right there. You're thinking, "Great. This is going to be easier than I thought." You bump it up to 100MB and you're ready to go.

 

 

The problem is that it doesn't seem to do anything. You still get an error whenever any file over 28MB's is uploaded even if you changed this setting in the web app settings all the way up to 2GB's.  The security built into 2008 is at fault here.  When you make the changes in the web app settings they do not get transferred to the web.config file automatically.  So you must manually update the web.config file for all web apps needing this change and update the web.config file in the 12 hive as well. You have to increase the file size limit as well as the time out settings to accommodate for the larger file sizes.

   

In the 12 hive we need this change.  This is the web.config file in the templates gallery.

   

   

   

Change the web.config file for all web apps that need the larger file size upload.

   

This will stop the time out problem.

   

Now for the file size:

   

On a Windows Server 2008 computer that has IIS 7.0-only installations, you add the maxAllowedContentLength value. When you are running Windows SharePoint Services on a Windows Server 2008-based computer that has IIS 7.0, you find that you cannot upload files that are larger than 28 MB even though you have configured the large file upload settings. Usually, the error that users see is "The page cannot be displayed." In some circumstances, users may also see an "HTTP 404" error.

To work around this problem, set in the Web.config file for the Web application to have following settings under the <configuration> section:

  • Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:

    Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder

  • Add the following settings under the <configuration> section of the Web.config file:

    <system.webServer>
    <security>
    <requestFiltering>
    <requestLimits maxAllowedContentLength="52428800"/>
    </requestFiltering>
    </security>
    </system.webServer>

Note maxAllowedContentLength="52428800" in bytes has to match the size of file that you are trying to upload. Also, when you set the number, increase it slightly beyond the maximum file upload size that you have configured in SharePoint. If the number is equal to or less, users will not receive the error message that they are exceeding the size limit if they try to upload a file size larger than that specified by the administrator.

   

 Place the above code at the bottom just before the close out of the configuration section like this:

   

 

 

You should now be able to upload your larger files.

   

My (Current) Least Favorite SharePoint Function

My Least Favorite SharePoint Function (at the moment)

Start with your basic SharePoint list; pick a list, any list will do. You say to yourself, "Self, I would like to be notified whenever anyone adds a new item to this list." Easy enough; you just go the Actions / Alert Me and setup an email alert.

But then you say to yourself, "This list may contain sensitive or personal information so we should probably set up permissions so that user can only see their own items and no one else's. Again, easy to do. Go to Settings / List Settings.

Then, under General Settings, choose Advanced settings

In the Item-level Permissions section change the Read access and Edit access options from "All items" to "Only their own"

Then you decide that you need to have another person receive an email notification when a new item is posted so you go back to the main list page and choose Actions / Alert Me. This is where the fun really begins because now you get an error:

You can't create alerts on the list if you set them to read only their own items. And the fun hasn't stopped yet because when you check on your alerts (which you can do through Site Actions / Site Settings / User alerts) you'll discover that the alert you set up before you changed the view settings of the list is no longer there. Nice.

I know I can open up SharePoint Designer and create a Workflow for the email notification, I just don't want to.

Excel 2007 Import Spreadsheet Error

The fix for: Method Post Error in Excel 2007 Import Spreadsheet to SharePoint

Have you tried importing a Excel 2007 spreadsheet into SharePoint Service v3 and are getting a Method Post Error? Thanks to an open SharePoint forum, someone posted the fix. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

Here is his post below:

Importing lists from Excel 2007 returns a Method 'Post' of object 'IOWSPostData' failed dialog. Not really a problem with WSS 3.0 but rather the result of a failed Application.SharePointVersion() call in the Excel Add-In which results in Excel attempting to use the IOWSPostData.Post() method to publish the Excel range which is used with SharePoint Team Services 1.0. By forcing the version lookup result variable to 2 or greater, Excel will use SOAP to communicate with WSS 3.0 and the publish request will be successful.

To make this change, open the Excel Add-In EXPTOOWS.XLA locate in C:\Program Files\Microsoft Office\Office12\1033 by default. Press Alt+F11 to display the Visual Basic code editor and search (Ctrl+F) for the line lVer = Application.SharePointVersion(URL). Comment out that line with a single quote and add the line lVer=2 so your Intialize() method should now look like this:

Sub Initialize(List, Title,
URL, QuickLaunch)

strQuickLaunch = QuickLaunch

aTarget(iPublishURL) = URL

aTarget(iPublishListName) = List

aTarget(iPublishListDesc) = Title

'lVer =
Application.SharePointVersion(URL)

lVer = 2

End Sub