1

Sorry StackOverflow, I know this is already asked and found lot of answers and i tried almost all and seems alright on config but throws exception so had to bring here.

I am limiting user to upload maximum 8 photos hince look like maximum request length exceeded.

I referenced from :

Maximum value of maxRequestLength?

Maximum request length exceeded

and this is in my config file:

  <location path="MyHome.aspx">
 <system.web>
  <httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
 </system.web>
 </location>
 <system.webServer>
    <defaultDocument>
        <files>
            <add value="Home.aspx" />
        </files>
    </defaultDocument>
  </system.webServer>
<system.webServer>
<security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="1073741824" />
  </requestFiltering>
 </security>
</system.webServer>

Can someone help me on this, What am i doing wrong so my file are not uploading and throwing above exception?

Thank you and Sorry for my bad English.

Community
  • 1
  • 1
abcool
  • 95
  • 1
  • 10

1 Answers1

4

Your System.Web element seems to be under Location element , Make sure its under Configuration element.

Something like this :

<configuration>
<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
</system.web>
</configuration>
Hagay Goshen
  • 599
  • 2
  • 13