The Problem: You are attempting to create create an asp.net mvc 3 page with razor that uses an upload control. You try to upload an image and all you get is a “server not available” error. Not very descriptive it it?
The Cause: ASP.net sets the default upload limit very low.
The Solution: Raise the limit, just add this to the web.config file ,
<httpRuntime maxRequestLength=”9097151″ executionTimeout=”3600″/>
That’s it!
This post originally appeared on the Stronico blog – with the absorption of Stronico into Digital Tool Factory this post has been moved to the Digital Tool Factory blog
|
Written By Steve French |
I do not like it. I want to see a Timeout and change things for it (optimize queries, for example).
In my projects (WebForms), I placed all upload handler in directory with this code. Only upload and similar handlers.