IIS 7.0
Windows server 2008 SP2
When we try uploadig documents in sharepoint 2007 doc lib, it was giving me error due to big file size.
After research got the technet article as http://support.microsoft.com/kb/925083 which says that we need to do changes in web.config file for that web application along with settings in IIS related to connection timeout.
Increase the maximum upload size
Click Start, All Programs > Administrative Tools, and then click SharePoint Central Administration > click Application Management.
Under SharePoint Web Application Management > Web application general settings.
On the Web Application General Settings page, click the Web application that you want to change.
Under Maximum upload size, type the maximum file size in megabytes that you want, and then click OK.
Increase the connection time-out setting
By default, the IIS connection time-out setting is 120 seconds. To increase the connection time-out setting in IIS 7.0 , follow these steps:
Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
Selecet the site for which you want to imcrease the connection time out settings > on right had side, click advanced settings
Under Behavior, click on the + sign for connection limit and edit the connection time out settings (seconds) to 360(as per required).
Add the executionTimeout value
Use Notepad to open the Web.config file. By default, this file is in the following location:
Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS
Add the executionTimeout value that you want. For example, replace the value as follows.
Existing code (Note: remove -- from the tags)
<--location path="upload.aspx">
<--system.web>
<--httpRuntime maxRequestLength="2097151" />
<--/system.web>
<--/location>
Replacement code (Note: remove -- from the tags)
<--location path="upload.aspx">
<--system.web>
<--httpRuntime executionTimeout="999999" maxRequestLength="2097151" />
<--/system.web>
<--/location>
After you change the file, click Save on the File menu.
Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:
Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
Change the following line in the file.
Existing line (Note: remove -- from the tags)
<--httpRuntime maxRequestLength="51200" />
Replacement line (Note: remove -- from the tags)
<--httpRuntime executionTimeout="999999" maxRequestLength="51200" />
Exit.
Restart the site from IIS and try uploading the required .wmv file
You will be surprised to see that there was no error and it seems as if the file got uploaded.
What is this!!!!!
When you browse to that document library, you will be surprised to see that the file is not there :(
Yes... this is where we need to do some more changes in web.config file for IIS 7.0 users
The changes are as follows:
Adjusting File Size Limit in IIS 7
The problem is that in IIS 7 on Windows 2008 Server, the web application will reject any file that is larger than 30 MB. You can increase the maximum file size by adding the following code to
<--security>
<--requestFiltering>
<--requestLimits maxAllowedContentLength=”2000000000″ />
<--/requestFiltering>
<--/security>
and inplace of the
<--httpRuntime executionTimeout="999999" maxRequestLength="51200" />
With the above maxAllowedContentLength and Max RequestLength, users can upload files that are 2,000,000,000 bytes in size. This setting will work right away without restart IIS services.