RadAsyncUpload Maximum File Size - asp.net

I have been asked to write an application that basically moves files from a source (USB, CD) to a centralized location. Initially this application will be for internal use only but in the future may be needed by remote users. The files I need to move can be in excess of 4-5Gb. It has been suggested I use the Telerik RadAsyncUpload component. Can anyone tell me if I am likely to run into problems trying to upload files of this size using this control?

To allow larger uploads the maxRexquestLength and executionTimeout needs to be added to your web.config:
<system.web>
<httpRuntime targetFramework="4.5" maxRequestLength="5242880" executionTimeout="10800" />
</system.web>
The trickiest part of having this work is that the execution timeout may exceed the upload time required. So set it higher based on your average users bandwidth. We monitor this by logging when the execution timeout occurs and adjusting as needed periodically. Since your app will be internally initially this probably won't be an issue at all if they are transferring over the LAN.
Further info on this is available in the Telerik documentation here.

There are 3 parts on setting the size of the file that could be uploaded through RadAsyncUpload:
1) Setting the file size in the telerik control
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="100000000" />
</requestFiltering>
</security>
2)Configures ASP.NET HTTP runtime settings, to allow the http Request message to be able to include your file. Here we need to set the maxRequestLength and executionTimeout accordingly.
<system.web><httpRuntime targetFramework="4.5" maxRequestLength="102400" executionTimeout="2147483647" /></system.web>
3)IIS server would generally allow only 30MB of file to be uploaded. To be able to upload larger files, we need to make some other settings in the web.config , to increase the request limits.
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="100000000" />
</requestFiltering>
</security>

Related

How to debug large file upload error on IIS website (using Joomla)

I have seen many questions asking the same thing, and this trick seemed to work for them, but not in my case.
I have been tasked with setting up a webpage on a company's server for training videos. I can't embed them from a site such as YouTube because they contain sensitive information.
The webpage has been set up using Joomla on Windows Server 2012. This is the first time I've ever experienced IIS since I only have experience with Apache.
The files I am trying to upload are just under 1GB. When I attempt to upload, I get Error Total size of upload exceeds the limit.
Here is what I have placed in the web.config file (since there isn't a php.ini file):
<configuration>
<system.web>
<!-- this is my edit -->
<httpRuntime maxRequestLength="2097151" executionTimeout="3600" />
</system.web>
<location path=".">
<system.webServer>
<security>
<requestFiltering>
<!-- this is my other edit -->
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
I go into CMD and enter "iisreset" to restart, and it still gives me the same error.
I also found forums where people were advising a change with maxRequestLength, so I also wrote this in the config file:
<system.web>
<httpRuntime maxRequestLength="2097151" executionTimeout="3600" />
</system.web>
Still no dice. The client is becoming very impatient since they still haven't received what they asked for. We originally tried to place the videos on their Wordpress site, but that didn't work either since it is on a shared hosting server.
I found this webpage that instructed me (at the bottom) to run a program on the server, but I don't know how to do that yet. I unzipped it and it opened in Visual Studio. No idea where to go from here. Any help would be appreciated.

Default Limits <limits> for IIS Express

I need to test a file upload component that will be accepting very large files. I want to test locally in my development environment but since I use IIS Express instead of IIS 7 I am not sure where to make the global change.
In IIS 7 the change cannot be made via the web.config but needs to be changed through the IIS Manager Tool. See this IIS article for an example.
Does anyone know how to make the same global change using IIS Express (in Visual Studio 2013)?
If the web.config change ppascualv suggested doesn't work, try putting it in the IIS Express applicationhost.config, which can be found at
%userprofile%\my documents\iisexpress\config\applicationhost.config
under
<system.webServer>
put
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="524288000"/>
</requestFiltering>
</security>
This should set it as a global, unless a web.config from an application overrides it.
You basically need to set both in web.config maxRequestLength and maxAllowedContentLength to upload files.
maxRequestLength Indicates the maximum file upload size supported by ASP.NET
maxAllowedContentLength This specifies the maximum length of content in a request supported by IIS.
Note:maxRequestLength is in kilobytes & maxAllowedContentLength is in Bytes
By default, Machine.config is configured to accept HTTP Requests upto 4096 KB (4 MB) and it is reflected in all your ASP.NET applications. You can change the Machine.config file directly, or you can change only the Web.config file of the application(s) you want to
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="524288000"/>
</requestFiltering>
</security>
</system.webServer>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
As others mentioned already you need to modify applicationhost.config and put into it
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="524288000"/>
</requestFiltering>
</security>
What other people didn't mention is that when you are running your web app from Visual Studio, the location of applicationhost.config in the root directory of your project is
.vs\{your_project_name}\config\applicationhost.config and this is the file you will need to modify
You can use this in web.config
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="524288000"/>
</requestFiltering>
</security>
</system.webServer>
Working to get around the "400 Bad Request" due to request headers that are too big, against the Visual Studio 2019's default IIS Express instance, I couldn't get Sarah's solution to work, but found that the http.sys settings here did the trick.
Specifically, I created inside HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters a DWORD registry value called MaxRequestBytes and setting it to a large enough value. For me, 33000 was enough. Also created MaxFieldLength in the same place, and set it to 33000. A machine reboot is mandatory for the setting to become effective.
As for the cause of my problem, it's described here. It's essentially caused by authentication cookies that get placed inside the request headers. Pushing to an Azure App Service works just fine (the limit for the headers there is probably 32KB), but against the local IIS Express, it failed continuously, until the fix described above.

How to upload up 10gb file on ASP.NET

I have done a application on asp.net and I'm saving a video and audio file is sql server
i have a issue with uploading big file over on sever. appls is hosted on ISS7 here i used a code in web.config file that is a below:
<httpRuntime executionTimeout="3600" maxRequestLength="102400"/>
and
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1024000000"/>
</requestFiltering>
</security>
</system.webServer>
but im getting error on uploading time that is below in image:
please help me out how can i upload files up to 10GB with ISS7
10GB file im save ing as a varbinary(MAX) and 10GB was converting in Byte
With out-of-the-box ASP.NET, you are not going to be able to upload a file that big, because IIS will either timeout or you will exceed the size limitations (read: maxRequestLength setting for IIS).
You have a few options:
Custom HTTP module
NeatUpload is a free option.
Silverlight/Flash option
SWFUpload is a free option.
Asynchronous chunking option
RadAsyncUpload - Telerik's ASP.NET AsyncUpload is a pay option, check website for pricing.
<httpRuntime executionTimeout="3600" maxRequestLength="102400"/>
is about 10Mb (maxRequestLength is in Kb - see http://msdn.microsoft.com/en-us/library/e1f13641(v=vs.100).aspx)
You try set it to 10485760...

ASP.NET Uploading file over 300KB~ makes browser lose connection

I've been running my image-uploading site for about a month now. I haven't touched the script lately and this problem that occurs now never happened before, with even bigger uploads.
When uploading a file with a size that exceeds the 300 KB area, your browser would lose connection. Anything lower than that would upload immediatly, you hit the upload button in no moments you're redirected to the page of your image.
The website address is http://img.kfirprods.com/Upload.aspx
As for my web.config, I tried all these suggestions to change execution time and maxRequestLength but none of these helped, with both modest sizes and unmodest sizes. The default settings for the requestLength is about 4MB and the user-server connection is lost way before that. This is my web.config
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime requestValidationMode="2.0" />
<customErrors mode="Off"/>
<machineKey
validationKey="EEF33150A048D162D22CB36E1CB9956B148C7A4E6999D0F05B53D416D7A16F83823DD626F501DD3549D3E5DCB473634739D0AD9A07F71560946498C943A7586D"
decryptionKey="0E95F75864047EB6322EA7D5246F2C1175D77A1B016F293C3BAAD000299A3DC8"
validation="SHA1"
decryption="AES" />
</system.web>
</configuration>
There were others httpRuntime settings but even the default settings, which should work - don't. However, what exactly happens is that the server behaves as if it's down but it will only be down to the user who exceeded that small size of upload and return after a minute or two. Please, anyone who's even a bit of an expert - try to upload some 'heavy' picture and see if you recognize the problem.
Put following in your web.config file
<configuration>
<system.web>
<httpRuntime maxRequestLength="4096" />
</system.web>
</configuration>
by default the value is 4096 = 4mb. However, on shared hosting individual hosts might configure a different value and it limits the size of file that you can upload.
Further, you can/cannot modify these settings depending on the permissions given by your host.
Please set Server.ScriptTimeout to longer value like
Server.ScriptTimeout=36000
with adding
<httpRuntime maxRequestLength="9999" />
setting in webconfig. Please let me know if this does not work
The uploading limit of ASP.NET FileUploader is 4MB. But you can increase the limit of length of uploaded file by adding the following code into your web.config:
<configuration>
<system.web>
<httpRuntime maxRequestLength="4096" />
</system.web>
</configuration>
It's also a good idea to ADD executiontimeout
<configuration>
<system.web>
<httpRuntime maxRequestLength="4096" executiontimeout="700" />
</system.web>
</configuration>
I will ask the host provider (HostGator) if they know anything about it, again (the first customer support guy didn't seem to know much at all). If it won't work, I might as well give up, it's not like there are not enough image uploading websites on the web. Thanks for those who tried to help!

What's the maximum size Content extract possible with Tridion CP 2009 SP1?

I'm getting "Content too large" errors at ~ 120MB. Is this a hard limit or is it possible to extend via settings?
ASFAIK, there are no hard limits at the content porter level. However, IIS has default 30 MB limit on file uploads. You can increase the value in web.config to higher value based on your needs.
Reference Link on increasing the limit: http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_ContentPorter_2009_SP1/task_CCFED8DFFA9A4E138DEA72FBDF4C18AD
<system.web>
<httpRuntime maxRequestLength="209715200"/>
</system.web>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="209752100" />
</requestFiltering>
</security>
The above config value in web.config will set the limit to 200 MB.
Do not forget to start the Tridion core services, content porter service and IIS reset after the changes done.
Hope this information helps.

Resources