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
.
<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?[
^]