Wednesday, August 4, 2010

maxRequestLength and Large File Uploads for Web Server

I had an end user working with InfoPath Form Services in MOSS get an error when he attempted to load large attachments to his InfoPath document. Sure enough there was no httpRuntime tag in the machine.config file on the Web Front Ends (WFE), and thus no maxRequestLength attribute setting. The default value is 4096 which means 4096 kilobytes or 4 Meg. I upped it to 16 meg and the problem went away.

See http://msdn.microsoft.com/en-us/library/e1f13641(VS.71).aspx for technical specifications on the httpRuntime tag and its maxRequestLength attribute.

Here's a snippet of machine.config to demonstrate the concept.

<configuration>
<system.web>
<httpRuntime maxRequestLength=16384 />
</system.web>
</configuration>

You can locate the machine.config file in the MOSS WFE's .NET framework runtime's config directory within the Windows Microsoft.Net directory tree. In my case it was the C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config directory.

No comments:

Post a Comment