FileUpEE's HttpModule is an interceptor that is used under ASP.NET to overcome inefficient memory utilization and disk caching performance in ASP.NET uploads. Additionally, it enables accurate server-side progress indication. The HttpModule intercepts an upload request, reads all the data, and writes it to a temp file chunk by chunk before sending it to ASP.NET. With the HttpModule and chunked transfer encoding, upload size in ASP.NET is unlimited.
It should be noted, however, that all major internet browsers have upload limits of 2 GB. Larger uploads must be generated by a client-side control that can handle very large transfers. FileUpEE includes SoftArtisans XFileEE, a client-side file transfer control that can submit uploads of any size.
For performance reasons, the HttpModule can be configured not to intercept all ASP.NET requests. SoftArtisans suggests that only requests for files with the extension .uplx be handled by the HttpModule, allowing requests with the extension .aspx to be sent directly to ASP.NET. This prevents burdening the server with unnecessary use of the HttpModule.
Note: You can use any file extension as the FileUpEE Module file extension, provided that it is 7 or fewer characters in length and is not already in use. In order to use a file extension other than .uplx, replace .uplx with your own custom extension in the instructions listed below. |
Under <system.web>
, add the following node, which adds the FileUpEE
HttpModule to the project:
<httpModules>
<add name="FileUpEeModule" type="SoftArtisans.Net.FileUpEeFilter.Module.FileUpEeModule,
FileUpEeModule, version=x.x.x.x, Culture=neutral, PublicKeyToken=f593502af6ee46ae"/>
</httpModule>
Directly under the previous node, add the following node, which allows the .uplx extension to be processed by .NET:
<httpHandlers>
<add verb="*" path="*.uplx" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
<compiliation>
node:
<compilation>
<buildProviders>
<add extension=".uplx" type="System.Web.Compilation.PageBuildProvider"/>
</buildProviders>
</compilation>
<appSettings>
node of the web.config
file. A table detailing the use of these settings can be found on the
HttpModule Application Keys page.<appSettings>
node in your application's
web.config file. These are sample values and should be changed to suit the needs of your application.
<appSettings>
<add key="Resumable" value="true" />
<add key="AllowClientOverride" value="true"/>
<add key="FileUpEeTempDir" value="C:\Temp\FileUpEe\Cache" />
<add key="TransferStage" value="1" />
<add key="UseHttpModuleWithAspDotNet" value="true"/>
<add key="FilterAspDotNetFlagExtension" value=".uplx" />
<add key="FilterAspDotNetAtNKiloBytes"value="0"/>
<add key="MaxKBytes" value="0" />
<add key="MaxKBytesToCancel" value="0"/>
<add key="ProgressIndicator" value="true" />
<add key="ProgressIndicatorParam" value="progressid" />
<add key="DynamicAdjustScriptTimeout" value="true" />
<add key="ErrorLogDestination" value="0" />
<add key="ErrorLogFile" value="C:\Temp\logs\FileUpEeModuleError.log"/>
<add key="TraceLogFile" value="C:\Temp\logs\FileUpEeModuleTrace.log" />
<add key="FilterReadBufferNKiloBytes" value="32" />
<add key="MaxReadMemoryKiloBytes" value="16000" />
<add key="FileWriteBufferNKiloBytes" value="32" />
</appSettings>
A sample web.config file for the HttpModule installed on the application
level can be found on our Sample web.config page, complete with
explanations of each value.
FilterAspDotNetFlagExtension
application setting key can
be used to intercept files with any file extension, including .aspx, using FileUpEE's
HttpModule, SoftArtisans
recommends using extension .uplx to keep from filtering .aspx files that
do not use FileUpEE. After a request is handled by the HttpModule, the request is
forwarded to ASP.NET. To allow ASP.NET to process files with the extension .uplx,
you must add a script map to IIS (for security reasons, FileUpEE's automatic installation
does not add the script map automatically).
In the Windows XP IIS console, the Web Sites and Default web Site nodes have identical properties dialogs. The script maps can be installed in the web Sites properties, but they will be ignored by IIS. The script maps must be installed from the node containing your FileUpEE application. |
OR
Under ASP.NET, FileUpEE's progress indicator is handled by the HttpModule. So, to display accurate progress indication, upload to a page with the .uplx extension. |
<httpHandlers>
node of machine.config:
<add verb="GET,HEAD,POST" path="*.uplx" type="System.Web.UI.PageHandlerFactory" />
Add the line above to machine.config before these entries:<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler" />
<add name="FileUpEeModule" type="SoftArtisans.Net.FileUpEeModule, FileUpEeModule,
Version=x.x.x.x, Culture=neutral, PublicKeyToken=f593502af6ee46ae"/>
<add assembly="FileUpEEModule, Version=x.x.x.x, Culture=neutral,
PublicKeyToken=f593502af6ee46ae"/>
<compiliation>
node:
<compilation>
<buildProviders>
<add extension=".uplx" type="System.Web.Compilation.PageBuildProvider"/>
</buildProviders>
</compilation>
To add the FileUpEE assemblies to your application after having installed it in the GAC, follow the same instructions as you would for adding the assembly on the application level, making sure that the FileUpEE dlls that you add to your application are the ones that have been registered in the GAC.
The version attribute must correspond exactly to the version
of FileUpEeModule.dll that you added to the GAC. If you add a new version of FileUpEeModule.dll
to the GAC, update the version attribute in machine.config. To get
the exact version of FileUpEeModule.dll, right-click the file and select the Properties
tab.
|