2

I would like to know something .

When I upload a file to the server, when the file around 25mb i can upload it .When it's more, it looks like the response is not ending, so it's not uploading...

This is my webconfig , and on the server the time request limit is 9999 seconds ..

<authorization>
  <deny users="?" />
  <allow users="*" />
</authorization>
<sessionState cookieless="false"/>
<httpRuntime maxRequestLength="1048576"/>
 </system.web>
  <appSettings>
    <add key="FolderPath"  value="uploads" />
  </appSettings>
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
  </system.serviceModel>
 </configuration>
0

2 Answers 2

2

If you are hosting this in IIS 7.0 you might also need to increase the limit using the <system.webServer> tag in your web.config by setting the maxAllowedContentLength value:

<system.webServer>
    <security>
        <requestFiltering>
            <!-- limit to 100MB -->
            <requestLimits maxAllowedContentLength="104857600" />
        </requestFiltering>
    </security>
</system.webServer>

The default value is 30000000 bytes which is approximately 28.6MB

Sign up to request clarification or add additional context in comments.

Comments

1

Did you try with -1 for maxRequestLength. -1 specifies that there is no limit.

1 Comment

setting maxRequestLength to no limit, will make Denail attack, user can post huge amount of data, and will make load on the server. you can set the MaxrequestLength to some limited amount of bytes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.