in

ASP.NET Weblogs

Phil Scott's WebLog

Quite exciting this computer magic

404 Errors with FileUpload with IIS7

I was getting some 404 errors while using the FileUpload control. I tested it out on my local machine and  using

<system.web>
        <httpRuntime maxRequestLength="256000"/> <!-- request length is in kilobytes -->
</system.web>

worked fine. But once I moved it onto IIS7 everything started freaking out. Turns out IIS7 look for a different setting:

    <system.webServer>
        <security>
            <requestFiltering><requestLimits maxAllowedContentLength="262144000" /></requestFiltering> <!-- maxAllowedContentLength is in bytes. Defaults to 30,000,000 -->
        </security>
    </system.webServer>

My searches really only directed me to modifying the system.web, so hopefully this will help someone out.

Comments

 

Brannon said:

Dude. You rock. How the heck did you figure this out?

March 6, 2009 12:42 PM
 

daria said:

ncq3Lv Gra7noI59Unral92Bb7wf

August 18, 2009 10:37 PM
 

Birdbuster said:

Hey I am getting error when i tried to add a new .xml file to the directory iis7 says Error: Element 'config schema' expected

November 16, 2009 5:28 PM
 

simran said:

thanks. this saved my day

March 30, 2010 5:22 AM
 

mats said:

Excellent, much appreciated.

September 30, 2010 10:51 AM
 

MOSS Upload Size? Drija said:

Pingback from  MOSS Upload Size? Drija

November 16, 2010 4:24 PM
 

Moses said:

That's what I'm talking about.

You saved me from hours of pain.

Thanks man.

December 26, 2010 7:48 PM
 

VincentSerpico said:

Thanks, Phil.

January 2, 2011 3:08 AM
 

Dave said:

It worked for me! Thanks, I've tried everything else.

February 9, 2011 10:21 PM
 

Sean said:

It worked for me!  Thanks, I've tried nothing else.  Quite convenient, really.

March 1, 2011 2:11 PM
 

Ram said:

It worked for me too.Thanks. You saved hours of time.

March 2, 2011 9:56 AM
 

Tom said:

Whew!  It worked!  Thanks!

June 1, 2011 2:42 PM
 

Justin said:

I wish I stumbled on this a week ago.  Thanks a million.

August 21, 2011 10:17 PM
 

MOSS Upload Size? - Admins Goodies said:

Pingback from  MOSS Upload Size? - Admins Goodies

August 22, 2011 7:50 AM
 

Dwayne said:

Your rock.  Saved my day.

December 13, 2011 9:56 AM
 

Felps said:

Man, you just saved our arses back here in Brazil... The Project Presentation will happen tomorrow 9AM, and it's 9PM here now :), and suddenly everything stopped working, till we found your blog!

January 4, 2012 5:42 PM
 

David said:

Perfect, just the info I needed.  Thanks for posting that up.

January 9, 2012 6:26 PM
 

Jon said:

Exactly what I needed!!!  Thanks for posting!

January 10, 2012 3:44 PM
 

Peto said:

Great! it worked!

Thanks!

March 2, 2012 8:22 AM
 

Ken said:

This really saved me some time.  Thanks for putting this out for others to find and use.

June 13, 2012 1:43 PM
 

MOSS Upload Size? | eeYogo @ yo' service said:

Pingback from  MOSS Upload Size? | eeYogo @ yo&#039; service

June 19, 2012 8:54 PM
 

Jeff said:

PERFECT, thankful i found this on page 1 of search results or this would've driven me nuts!

July 10, 2012 4:17 PM
 

Diator said:

Wow!  Now it works like a charm... After 10 hrs of pain blood...  Thanks!

August 24, 2012 4:17 PM
 

Daniel said:

PERFECT ! THANK YOU !

December 6, 2012 9:30 AM
 

Megumi said:

It worked perfectly!  Thanks!

February 4, 2013 10:29 AM
 

Khaled Kokah said:

Okay, everyone said that you're awesome .. well, you are AMAZING I love you man :) thanks for the great tip.

February 16, 2013 9:21 AM

Leave a Comment

(required)  
(optional)
(required)  
Add