Locked[FAQ]Adding Upload Progress bar

Author
APGvNext Sam
vNext Dev
  • Total Posts : 13240
  • Joined: 2001/05/23 00:00:00
  • Status: offline
2008/09/18 10:59:48 (permalink) 3.x

Adding Upload Progress bar

If your hosting environment is in Full Trust mode, you can enable Upload Progress bar by making some code changes.

NOTE: if your host specifically set the trust level to Medium (most hosting companies do this), you cannot use this progress bar feature.

Click to see instruction if you see popup error message when you upload in Medium Trust
To prevent seeing the error message, you need to modify some code. There are 2 places

upload.aspx - remove or comment out (<%-- --%> )
    <telerik:RadProgressArea id="RadProgressArea1" runat="server" />         
    <telerik:RadProgressManager id="RadProgressManager1" runat="server" />  


(up to version 3.2) upload.aspx.vb - comment out

        If ASPPG.Data.ApplicationDataRelated.APP_TrustLevel <> AspNetHostingPermissionLevel.Unrestricted Then        
            RadProgressArea1.Visible = False
            RadProgressManager1.Visible = False
        End If
close

Instruction to enable upload progress bar

Open upload.aspx - uncomment (removing <%-- --%> surrounding the following block)
     <telerik:RadProgressArea id="RadProgressArea1" runat="server" />         
    <telerik:RadProgressManager id="RadProgressManager1" runat="server" />  


Open web.config, and make the following changes:
  1. If you are using IIS 6 or IIS7 Classic Mode:

    under system.web > httpModules, uncomment
    <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />

    under system.web > httpHandlers, uncomment
    <add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI" validate="false" />
  2. If you are using the IIS 7 Integrated Mode:

    under system.webServer > modules, uncomment
    <add name="ProgressModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />

    under system.webServer > handlers, uncomment
    <add name="TelerikRadProgress" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI" />     
  3. In the SessionUpdateNotRequiredPages key under the <appSettings> section, add

    ~/Telerik.RadUploadProgressHandler.ashx

    to the end of the file list (separated by a comma).
  4. Application Trace must be set to false
    <trace enabled="false" requestLimit="1000" pageOutput="false" localOnly="true" mostRecent="true" />

  5. Outside of system.web, add:
        <location path="Telerik.RadUploadProgressHandler.ashx">          
            <system.web>
                <authorization>
                    <allow users="*"/>
                </authorization >
            </system.web>
        </location>
  6. Make sure you set the trust level to Full:
    <trust level="Full" />
Save the file and upload it to your server to overwrite existing file. You will now see the upload progress bar when you upload a file.
post edited by Samuel - 2010/05/26 17:14:07
#1
Jump to:
© 2021 APG vNext Commercial Version 5.5