ASP.NET File Upload Progress - Registration



IIS 6.0 and IIS 7.0 Classic mode:
  1. Open the Solution Explorer pane, navigate to the application web.config file and open it.

  2. Under the <configuration> element locate the <system.web> element. Add it if it does not exist.

  3. Under the <system.web> element locate the <httpHandlers> element. Add it if it does not exist.

  4. In the <httpHandlers> element add the following tag:

    <add verb="*" path="OboutInc.UploadProgressHandler.aspx"
            
    type="OboutInc.FileUpload.UploadProgressHandler, obout_FileUpload, Version=1.10.806.1,
                      Culture=neutral, PublicKeyToken=c8b4009f4d53d5e5
    " />


The final result should look like this

<configuration>
   ...
   <system.web>
     ...
     <httpHandlers>
        <add verb="*" path="OboutInc.UploadProgressHandler.aspx"
                 type="OboutInc.FileUpload.UploadProgressHandler, obout_FileUpload, Version=1.10.806.1,
                          Culture=neutral, PublicKeyToken=c8b4009f4d53d5e5
" />

        ...
     </httpHandlers>
  </system.web>
</configuration>

IIS 7.0 Integrated mode:
  1. Open the Solution Explorer pane, navigate to the application web.config file and open it.

  2. Under the <configuration> element locate the <system.webServer> element. Add it if it does not exist.

  3. Under the <system.webServer> element locate the <handlers> element. Add it if it does not exist.

  4. In the <handlers> element add the following tag:

    <add verb="*" path="OboutInc.UploadProgressHandler.aspx" name="UploadProgressHandler"
            
    type="OboutInc.FileUpload.UploadProgressHandler, obout_FileUpload, Version=1.10.806.1,
                      Culture=neutral, PublicKeyToken=c8b4009f4d53d5e5
    " />

The final result should look like this

<configuration>
   ...
   <system.webServer>
     ...
     <handlers>
        <
add verb="*" path="OboutInc.UploadProgressHandler.aspx" name="UploadProgressHandler"
                 type="OboutInc.FileUpload.UploadProgressHandler, obout_FileUpload, Version=1.10.806.1,
                          Culture=neutral, PublicKeyToken=c8b4009f4d53d5e5
" />
        ...
     </handlers>
  </
system.webServer>
</
configuration>

The configuration file sections and attributes are case sensitive. This means that the above sections and attributes will be incorrect if they are written using a case other than shown.

More Information

You can find more information in this MSDN article.


Important Notes

File Upload Progress control will display error alert if it is unable to find UploadProgressHandler.
Files uploading will be completed anyway.

If your application uses Forms authentication put the following text into your application web.config:

<location path="OboutInc.UploadProgressHandler.aspx">
   <system.web>
       <authorization>
           <allow users="*"/>
       </authorization>
   </system.web>
</location>

You can find more information about the <location> section in this MSDN article.