A number of configuration settings become very relevant when performing uploads. These can be changed by adding sections or values into the Web.Config file. A typical configuration section is given below. Full description of EAUpload settings schema you can find here EAUpload Configuration

<?xml version="1.0" encoding="utf-8" ?>
<configuration>         
 <configSections>
   <sectionGroup name="EasyAlgo.EAUpload">     
       <section name="Environment" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
       <section name="ErrorsProcessing" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   </sectionGroup>
   ...
 </configSections> 

<EasyAlgo.EAUpload>
    <Environment
        TemporaryPath="C:\Temp"
        ChunkSize="65536"
        ProcessPages="*.aspx"        
        UploadIDParameter="UploadId"
        MaxRequestLength="1048576"
        ExecutionTimeout="3600"
        EnableProgressInfo="true"
        SerialKey="Please enter a valid serial key!"        
    />
    <ErrorsProcessing
         ThrowErrorsImmediately="true"
     />
 </EasyAlgo.EAUpload>

 ...

 <system.web>
   ... 

   <httpModules>
       <add name="EAUploadModule" 
           type="EasyAlgo.EAUpload.EAUploadModule, EasyAlgo.EAUpload" />
   </httpModules>

   ...

   <sessionState timeout="60" />

   ...

 </system.web>
</configuration>

EasyAlgo.EAUpload section:

See description of EAUpload settings schema EAUpload Configuration.

EasyAlgo.EAUpload section is optional, and you can use the short configuration versoin. If you had chosen the short configuration versoin then you should register the EAUpload component as shown below:


CopyC#
// Global.asax.cs

public class Global : System.Web.HttpApplication
{
       ...

       public override void Init()
       {
           License.SerialKey = "valid serial key";

        base.Init();
       }

       ...

   }
CopyVB.NET
' Global.asax.vb


Public Class Global
       Inherits System.Web.HttpApplication

       ...

       Public Overrides Sub Init()

           License.SerialKey = "valid serial key"            

           MyBase.Init

       End Sub    

       ...

   End Class

httpModules section

EAUploadModule intercepts and processes POST requests, with "multipart/form-data" content type, to any or specified resources in ASP.NET application. For correct work of EAUpload component you should attach EAUploadModule to the ASP.NET request pipeline.

To integrate the EAUploadModule into your ASP.NET application you need to add it using a line in the httpModules subsection of the web.config file. This is shown in the example web.config file above.

In IIS 7.0, an application can run in either Classic or Integrated mode. In Classic mode, requests are processed basically the same as they are in IIS 6.0. In Integrated mode, IIS 7.0 manages requests by using a pipeline that enables it to share requests, modules, and other features with ASP.NET.

The procedure for registering a EAUploadModule is different in IIS 7.0 Classic mode and IIS 7.0 Integrated mode. To register the module for IIS 7.0 running in Integrated mode add the following highlighted code to the Web.config file:



<configuration>

    ...

     <system.webServer>
       <modules>
         <add name="EAUploadModule" type="EasyAlgo.EAUpload.EAUploadModule"/>
       </modules>
     </system.webServer>
	 
	 ...
	 
</configuration>
Note: You can also register the module by using IIS Manager. For more information, see Configuring Modules in IIS 7.0



You can use also the following compact configuration.


<?xml version="1.0" encoding="utf-8" ?>
<configuration>         

 ...

 <system.web>
   ... 
    <httpRuntime 
        maxRequestLength="1048576"
        executionTimeout="3600"
    />

   <httpModules>
       <add name="EAUploadModule" 
           type="EasyAlgo.EAUpload.EAUploadModule, EasyAlgo.EAUpload" />
   </httpModules>  

   <sessionState timeout="60" />

   ...

 </system.web>
</configuration>

httpRuntime section:

sessionState section