Click or drag to resize

PutUploadProgressAndResumeModule Class

IT Hit WebDAV Classes Reference
Enables non-cached upload of files to IIS/ASP.NET.
Inheritance Hierarchy
SystemObject
  ITHit.WebDAV.Server.ResumableUploadPutUploadProgressAndResumeModule

Namespace:  ITHit.WebDAV.Server.ResumableUpload
Assemblies:   ITHit.Server.Web (in ITHit.Server.Web.dll) Version: 9.1.5460-Beta
  ITHit.WebDAV.Server.Web (in ITHit.WebDAV.Server.Web.dll) Version: 9.1.5311-Beta
Syntax
public class PutUploadProgressAndResumeModule : IHttpModule

The PutUploadProgressAndResumeModule type exposes the following members.

Constructors
  NameDescription
Public methodPutUploadProgressAndResumeModule
Initializes a new instance of the PutUploadProgressAndResumeModule class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Always use this module if you implement resumable upload features and your WebDAV server is hosted in application that uses ASP.NET 2.0 pool. It is recommended to enable this module even if you do not need any resumable upload fetures but host your server is using ASP.NET 2.0 pool. This module is not required for application running in ASP.NET 4.0 pool or later and is ignored if enabled.

Without this module when a file is being uploaded to the server running as ASP.NET application with 2.0 pool, the file will be first saved to temporary upload folder. Only when entire file is uploaded it becomes available for .NET user code. PutUploadProgressAndResumeModule eliminates this problem passing file content directly to Engine. This problem is specific to ASP.NET/IIS and you do not need this module when creating HttpListener-based server or if you are using ASP.NET 4.0 pool.

Note: Always use [!:ITHit.Server.ContextAsync<THierarchyItemAsync>(HttpContext)] overloaded constructor when utilizing this module.

Examples

Example of configuraiton for IIS 8 integrated mode and IIS 7.x integrated mode:

<system.webServer>
    <modules>
        <add 
            name="PutUploadProgressAndResumeModule"
            type="ITHit.WebDAV.Server.ResumableUpload.PutUploadProgressAndResumeModule, ITHit.WebDAV.Server"
            preCondition="integratedMode" />
    </modules>
</system.webServer>
Examples
Example of configuration for IIS 8 classic mode, IIS 7.x classic mode, IIS 6 and IIS 5.1:
<system.web>
    <httpModules>
        <remove name="FileAuthorization"/>
        <add 
            name="PutUploadProgressAndResumeModule"
            type="ITHit.WebDAV.Server.ResumableUpload.PutUploadProgressAndResumeModule, ITHit.WebDAV.Server" />
    </httpModules>
</system.web>
See Also