Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
XML
Hello,

I am trying to upload large video into sql server through our asp.net application.( Using File uploader and Bytes concept)..

i created column type in sql server as varbinary(MAX); for video uploading. from database side we can fix using filestream concept for larger file.

BUT,

When i try to upload more than 4MB, i got error on chrome browser as Web page is not available. So, i came to know that we need to increase the size in web.config

so i increased size in web.config.

<system.web>

<httpRuntime executionTimeout="120" maxRequestLength=" 2147483647" />

</system.web>

Now, i was able to upload video within 2GB as httpRuntime maxReqeustLenth is 2GB (int)

So, My requirement want to upload More than 2GM means how can i achieve ?

Help needed.

Thanks
Posted

1 solution

1.The default value for this config setting is 4096 in KB, that means 4MB, like you can see in MSDN[^]

2.So you have to increase this value, in your config file, to maximum allowed, but you should have a look also in the IIS constrains: requestLimits element for requestFiltering in IIS[^]

3.The maximum value for maxRequestLength is 2147483647 in KB that means 2TB (Terra Bytes) and not 2MB. The problem is that this setting is affected from IIS settings like I said in my 2nd point, so you should increase also some IIS related configurations.
 
Share this answer
 
v2
Comments
christhuxavier 19-Dec-14 7:41am    
I know and tested that default is 4096KB (4MB). also increased the size upto 2GB in web.config. But my question is that is there way to upload more than 2GB video from .net to sql server?
Raul Iloc 19-Dec-14 7:52am    
See my update (2.147.483.647 KB == 2TB ) !

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