0

I try to upload file (size: 364kb), and I get http error 404. I added to the web.config file the relevant settings:

  <location path="UploadFileServer.axd">
    <system.web>
      <httpRuntime executionTimeout="999999" maxRequestLength="2097151" />
    </system.web>
  </location>

  <system.web>
    <httpRuntime executionTimeout="999999" maxRequestLength="50000"/>
  </system.web>


    <system.webServer>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="52428800" />
          </requestFiltering>
        </security>
    </system.webServer>

but still, no luck!

Any suggestions why it fails? Am I doing something wrong?

Inbal
  • 909
  • 2
  • 28
  • 46
  • 404 is a 'File not found' response. Your URL is wrong, or the file you expect to find there is absent. –  Dec 26 '13 at 08:57
  • The file is there and everything works fine when the file is smaller (like 12kb). http://stackoverflow.com/questions/2759193/display-custom-error-page-when-file-upload-exceeds-allowed-size-in-asp-net-mvc/3787284#3787284 says: "For uploaded files with size bigger than maxAllowedContentLength IIS7 will display a detailed error page with error code 404 and subStatusCode 13. The error page can be found in C:\inetpub\custerr\en-US\404-13.htm" – Inbal Dec 26 '13 at 08:59
  • set maxAllowedContentLength to 1073741824 and check if if works – Masoumeh Karvar Dec 26 '13 at 09:35
  • Please check the AspBufferingLimit in Metabase.xml file. Please refer below URL: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/ea7e9c3f-d0c8-4e5c-8965-0d0429a3b8f1.mspx?mfr=true – Manoj Mevada Dec 26 '13 at 10:03
  • @ManojMevada As I read AspBufferingLimit is related to the response, I have no success in sending the request. Thanks. – Inbal Dec 26 '13 at 10:22
  • enhance second maxRequestLength value, set it like the first one. and enhance maxAllowedContentLength value too. I use maxRequestLength="1048576" and maxAllowedContentLength="1073741824" and it works. – Masoumeh Karvar Dec 26 '13 at 10:36
  • It is so stupid... I edited the wrong web.config! :( Thank you all for the help! – Inbal Dec 26 '13 at 12:03

0 Answers0