Hi solution mentioned by Damien McGivern,
Works on IIS6 only,
It does not work on IIS7 and ASP.NET Development Server. I get page displaying "404 - File or directory not found."
Any ideas?
EDIT:
Got it... This solution still doesn't work on ASP.NET Development Server, but I got the reason why it was not working on IIS7 in my case.
The reason is IIS7 has a built-in request scanning which imposes an upload file cap which defaults to 30000000 bytes (which is slightly less that 30MB).
And I was trying to upload file of size 100 MB to test the solution mentioned by Damien McGivern (with maxRequestLength="10240" i.e. 10MB in web.config). Now, If I upload the file of size > 10MB and < 30 MB then the page is redirected to the specified error page. But if the file size is > 30MB then it show the ugly built-in error page displaying "404 - File or directory not found."
So, to avoid this, you have to increase the max. allowed request content length for your website in IIS7.
That can be done using following command,
appcmd set config "SiteName" -section:requestFiltering -requestLimits.maxAllowedContentLength:209715200 -commitpath:apphost
I have set the max. content length to 200MB.
After doing this setting, the page is succssfully redirected to my error page when I try to upload file of 100MB
Refer, http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx for more details.