c# - Unable to handle http error 404.13 in mvc 5 app on iis 8.0 -


i working on mvc5 project allows users upload files. have methods filter out invalid file extensions (only pictures , pdfs allowed). however, when try upload large file, regardless of extension, error:

http error 404.13 - not found request filtering module configured deny request exceeds request content length. 

the method upload doesn't called, goes straight error page.

one post found expressed needed modify project's web.config file, , did such:

 <security>   <requestfiltering>     <requestlimits maxallowedcontentlength="6000000" />   </requestfiltering> </security> 

i still error, tried adding <httpruntime maxrequestlength="6000" executiontimeout="3600" /> <system.web>, threw error:

http error 500.19 - internal server error requested page cannot accessed because related configuration data  page invalid. 

obviously line must earlier versions of iis.

i found solution suggested editing applicationhost.config file on server project's web.config; did nothing.

any suggestions?

it looks made maxallowedcontentlength smaller. default 30000000 bytes , have 6000000 bytes above.

30000000 b = 30 mb

6000000 b = 6 mb

adding 0 should trick.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -