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
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:
- 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" />
- 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" />
- In the SessionUpdateNotRequiredPages key under the <appSettings> section, add
~/Telerik.RadUploadProgressHandler.ashx
to the end of the file list (separated by a comma). - Application Trace must be set to false
<trace enabled="false" requestLimit="1000" pageOutput="false" localOnly="true" mostRecent="true" />
- Outside of system.web, add:
<location path="Telerik.RadUploadProgressHandler.ashx">
<system.web>
<authorization>
<allow users="*"/>
</authorization >
</system.web>
</location>
- 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 -