PowUpload 1.3 control documentation

Web.Config structure:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>       <configSections>             <sectionGroup name="Element-IT.PowUpload">                   <section name="settings" type="System.Configuration.SingleTagSectionHandler,                   System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>             </sectionGroup>       </configSections>       <Element-IT.PowUpload>             <settings             tempPath = "C:\Temp\"             processPages = "*.aspx"             ignorePages = ""             uploadIDQueryField="UploadID"             ignoreHttpRuntimeMaxRequestLength = "true"             maxRequestLengthToCloseConnection = "-1"             maxRequestLength = "-1"             minRequestLengthProcess="-1"             bandwidthLimit = "-1"             passForm = "true"             throwErrorsImmediately = "true"             logExceptions = "false"             />       </Element-IT.PowUpload>       <system.web>             <httpModules>                   <add name="ElementIT.PowUpload.UploadModule" type="ElementIT.PowUpload.UploadModule, Element-IT.PowUpload" />             </httpModules>             <httpRuntime maxRequestLength="1048576" executionTimeout="3600" />             <sessionState timeout="60" />             <compilation>                   <assemblies>                         <add assembly="Element-IT.PowUpload, Version=1.3.0.0, Culture=neutral, PublicKeyToken=0f5ecb088372736c" />                   </assemblies>             </compilation>       </system.web> </configuration>

Element-IT.PowUpload Settings:

Attribute name Description
tempPath A folder path to store temporary files for upload process. Environment variables can be used.
Example: "%TEMP%" is the System TEMP folder. Grant NTFS Read and Write permissions to the anonymous
and ASPNET accounts in the temporary folder. If you running application with impersonation grant permissions to this user.
processPages A string containing a list of pages. The PowUpload module will process all POST requests to these pages.
Pages are separated by commas. Query string fields can be included.
In a string expression it is allowed to use literal text characters and patterns like ? and *.
Default value is "*.aspx" (process request to all .aspx pages).
ignorePages A string containing a list of pages. The PowUpload module will not process any POST request to these pages.
Format of the expression is the same as at the processPages. Default value is an empty string (don’t ignore nothing).
uploadIDQueryField Query string field to use to determine the ID for the upload process. Default value is "UploadID". A string "?UploadID=xxxxx" should be added to a file name of the "Action" parameter of the Form (for example, Action="processupload.aspx?UploadID=123456789").
ignoreHttpRuntimeMaxRequestLength Specifies if PowUpload should use own axRequestLength parameter
or to use native value of HttpRuntime element.
"true" to indicate if PowUpload should ignore maxRequestLength parameter
of HttpRuntime element (in Web.Config file) and to use own, otherwise "false".
maxRequestLengthToCloseConnection The maximum request size. All request greater than this value will be hard terminated.
Parameter helpfull to prevent of denial-of-service attacks or to reduce server load.
User gots not user-frienly message "Page can't be displayed" after connection terminated.
You can redirect user to other page from progress bar window using Java Scripts.
maxRequestLength The maximum request size, in bytes.
POST request can't be stoped. Connection can be hard
terminated (See MaxRequestLengthToCloseConnection parameter); otherwise
whole request will be received. If request greater than MaxRequestLength value PowUpload
willn't save files but will get non-files Form fields;
minRequestLengthProcess An integer that represents the minimal size of the POST request that the PowUpload module will process.
If the size of the POST request is less than the limit the built-in Request.Files collection will store files.
Default value is "-1" (all requests will be processed by the PowUpload module).
bandwidthLimit An integer specifies maximum upload speed for each request in bytes per second.
passForm Specifies if Form without files should be passed to ASP.NET built-in parser or not.
"true" to inditace if Form without files will be passed to ASP.NET parser, so Request.Form collection
will have Form fields values; otherwise "false". Use PowUpload.FormFields collection to read non-files Form fields values.
throwErrorsImmediately "true" to indicate if occurred error while upload should be shown immediately;
otherwise, "false" (error will be stored in the lastError property of the PowUpload class). Default value is "true".
logExceptions "true" to indicate if occurred exceptions will be logged in the Application Event Log. See manual how to config
access for application to Application Event Log.

httpModules

Responsible for configuring HTTP modules within an application. HTTP modules participate in the processing of every request into an application. ElementIT.PowUpload.UploadModule intercepts page requests before passing them on to ASP.NET

httpRuntime

Element configures ASP.NET HTTP runtime settings.
Attribute name Description
maxRequestLength Attribute indicates the maximum file upload size supported by ASP.NET.
This limit can be used to prevent denial of service attacks caused by users posting large files to the server.
The size specified is in kilobytes. The default is "4096" (4 MB).
Max value is "1048576" (1 GB) for .NET Framework 1.o and 1.1 and "2097151" (2 GB) for .NET Framework 2.0.
PowUpload ignores this parameter if ignoreHttpRuntimeMaxRequestLength set to "true" and supports up to 4 GB requests (limited by IIS) but most browsers don't sends greater than 2 GB files.
executionTimeout Attribute indicates the maximum number of seconds that a request is allowed to
execute before being automatically shut down by ASP.NET.
The executionTimeout value should always be longer than the amount of time that the upload process can take.

sessionState

Configures session state settings for the current application.
Attribute name Description
timeout Attribute specifies the number of minutes a session can be idle before it is abandoned. The default is 20. The Timeout value should always be longer than the amount of time that the upload process can take.

assemblies

Adds an assembly reference to use during compilation of a dynamic resource. ASP.NET automatically links this assembly to the resource when compiling each code module.

IIS7 (Windows Vista) ASP.NET file processing script

By default in IIS 7 enabled requestFiltering that have MaxAllowedContentLength property. It specifies, in bytes, the maximum length of content in a request. The default is 30000000 (approximately 30 megabytes.) To change this value you must include following code in your Web.config file if you want to apply this setting only to you application. If you want to change this setting for all of the computer and not just this ASP.NET application, you must modify the Machine.config file. By default, the element is set to the following parameters in the Machine.config file: The Machine.config file is located in the \System Root\Microsoft.NET\Framework\Version Number\CONFIG directory.


If you have error that requestFiltering cannot be overriden you must edit mashine.config file and change string
<section name="requestFiltering" overrideModeDefault="Deny" />
to <section name="requestFiltering" overrideModeDefault="Allow" />