Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can any one help me
i create upload project but i cant upload large size i read more articles and i try more to put this value in Max Length but i cant


<httpruntime maxrequestlength="2000000000" delaynotificationtimeout="108000" executiontimeout="108000000000">

XML
<sessionState timeout="360000" sqlCommandTimeout="360000" stateNetworkTimeout="360000">
    </sessionState>


if i put 3 G i cant do it
<httpruntime maxrequestlength="3000000000" delaynotificationtimeout="108000" executiontimeout="108000000000">

i have error in this line

i need to upload files more than 4 or 6 G
note : i used MVC and Visual Studio 2013
appreciate any one help me
Posted

1 solution

First I don't know why you are using sessionState in MVC, note that a good practices dictates that you should consider avoiding them (even before the MVC was introduced).

Nevertheless back to your upload issue, you can modify the project's web.config file to enable the 2GB upload. To be more specific you need to increase the maxRequestLength which is 4096 KB (4 MB) by default and probably the executionTimeout.
Also you need to adjust another restriction of ~28.6 MB for requestLimits.
XML
<system.web>
    ...
    <httpRuntime maxRequestLength="2147483647" executionTimeout="3600" />
	<security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="2147483647" />
      </requestFiltering>
    </security>
    ...
</system.web>

But for larger uploades you would need to change the approach, you can try some suggestions mentioned here: Upload large file in asp.net mvc[^]
Or you can try this: How to upload a big file in Mvc?[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900