Wednesday, 23 May 2007

ASP.NET - web.config and posting attachments

Ever wondered why you can only post requests around 4mb in your ASP.NET pages?

Simply edit the web.config file and add the following under the system.web section:

httpRuntime maxRequestLength="100000"

Remember to add < at the start and /> at the end of the line (this blog posting will not render the line properly if I type it!)

You can now post files (for example, into a database) larger than you ever would want to.

No comments: