I select a couple of files and have them uploaded to a remote server so that it takes some time to actually process the upload.
The problem is, no matter how I configure the ProgressArea the Estimated time is always 0:0:0s. Additionally, the Total Uploaded starts and stays at 100% and the Uploaded Files isn't really a progress, for 2 files it immediately shows 50% and then jumps to 100% when starting the 2nd file.
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<div> |
<telerik:RadUpload ID="RadUpload1" runat="server" TargetPhysicalFolder="z:\temp" ControlObjectsVisibility="All" /> |
<telerik:RadProgressManager ID="RadProgressManager1" runat="server" RefreshPeriod="100" /> |
<telerik:RadProgressArea ID="RadProgressArea1" runat="server" Skin="Vista"> |
</telerik:RadProgressArea> |
</div> |
<asp:Button runat="server" Text="Upload" /> |
</form> |
Thanks,
Mark
12 Answers, 1 is accepted
We tried to reproduce the problem locally, but without much success. Please find attached a project as part of our local tests. Could you try it at your side? Does it work?
Regards,
Helen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thanks,
Mark
What is the exact version of the IIS you are using?
Regards,
Helen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I have tried on Vista Business OS using IIS7, and also tried in Classic ASP.Net application pool.
I've also tried on WinXP Pro using IIS5.1.
I've ruled out UrlReWriting as the cause. The file DOES upload, but no progress bar is seen.
Please help
Lee.
A very strange problem indeed!
Lee,
If a URL Rewriter makes the Ajax call to not return valid progress result, RadProgressManager would display a message. However, a custom HttpModule could prevent RadUpload's HttpModule from working properly. RadUploadHttpModule is the object, which "reads" the information about the current request progress and provides the information to the RadUploadHttpHandler through the RadProgressContext object.
Can you verify you don't have some other module running too?
Paul,
Can you check if RadProgressManager starts making Ajax calls to update the progress? You can monitor this with the aid of Firebug (for Firefox) or Fiddler2 (for IE).
Kind regards,
Erjan Gavalji
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Sorry for wasting your time on my question. I ended up testing with a very large file (150MB) and the progress indicator appeared.
BTW the example you posted in this thread does not run in VS2008, 3.5 framework. The config file contains references to "System.Web.Extensions, Version=1.0.61025.0".
Here's the corrected web.config.
<?xml version="1.0"?> | |
<configuration> | |
<configSections> | |
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> | |
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> | |
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> | |
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> | |
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/> | |
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> | |
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> | |
</sectionGroup> | |
</sectionGroup> | |
</sectionGroup> | |
</configSections> | |
<system.web> | |
<pages> | |
<controls> | |
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> | |
</controls> | |
</pages> | |
<!-- | |
Set compilation debug="true" to insert debugging | |
symbols into the compiled page. Because this | |
affects performance, set this value to true only | |
during development. | |
--> | |
<compilation debug="true"> | |
<assemblies> | |
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
</assemblies> | |
</compilation> | |
<httpRuntime maxRequestLength="1024000"/> | |
<httpHandlers> | |
<remove verb="*" path="*.asmx"/> | |
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> | |
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> | |
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> | |
<add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI"/> | |
</httpHandlers> | |
<httpModules> | |
<!-- | |
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> | |
--> | |
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/> | |
</httpModules> | |
</system.web> | |
<system.web.extensions> | |
<scripting> | |
<webServices> | |
<!-- Uncomment this line to customize maxJsonLength and add a custom converter --> | |
<!-- | |
<jsonSerialization maxJsonLength="500"> | |
<converters> | |
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/> | |
</converters> | |
</jsonSerialization> | |
--> | |
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. --> | |
<!-- | |
<authenticationService enabled="true" requireSSL = "true|false"/> | |
--> | |
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved | |
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and | |
writeAccessProperties attributes. --> | |
<!-- | |
<profileService enabled="true" | |
readAccessProperties="propertyname1,propertyname2" | |
writeAccessProperties="propertyname1,propertyname2" /> | |
--> | |
</webServices> | |
<!-- | |
<scriptResourceHandler enableCompression="true" enableCaching="true" /> | |
--> | |
</scripting> | |
</system.web.extensions> | |
<system.webServer> | |
<validation validateIntegratedModeConfiguration="false"/> | |
<modules> | |
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="managedHandler" /> | |
</modules> | |
<handlers> | |
<remove name="WebServiceHandlerFactory-Integrated"/> | |
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> | |
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> | |
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> | |
</handlers> | |
</system.webServer> | |
</configuration> | |
Regards,
Paul
Hi
No, I am not running any other modules than a URL rewriter ISAPI filter, which is attached to IIS.
I have it working now anayway. Exactly what the solution is, I am not sure.
the progress manager will not always fire, but this seems to be when running on dev server and the uploaded file is not that large. When I upload a larger file (about 15mb), it works fine.
I'm guessing that on a live server, it will work with smaller files because they will take longer to upload due to the speed of the connection.
I did have some trouble with Q1 version of the Ajax controls. I had to uninstall them, completely and use Q2.
It's worth mentioning that it's important to check the web.config for references to the Telerik assembly version number. If you have a reference to an older version in your web.config file, it will crash. It seems that just upgrading to Q2 and dropping a control onto a page is not enough. You have to manually check your references in web.config.
I've read elsewhere on your forums that some users are doing complete uninstalls of VS to try to clear this problem, when all they need to do is the above.
Another quick quesion if I may. What is the best way to prevent someone from clicking the upload button more than once? I've tried :
this
.LinkButton_Upload.Attributes.Add("onclick", "this.disabled=true; this.value='Please wait';" + Page.ClientScript.GetPostBackEventReference(LinkButton_Upload, "").ToString());
Although the button becomes disabled, you can still click on it and re-envoke the thread, so you can end up with the same file being uploaded more than once.
Best wishes
Lee.
PS: That's got be worth some points!
Thank you for pointing out the version mismatch issue. It seems that we are missing troubleshooting information about it, so we will update our Troubleshooting section. Your Telerik points have been updated for the suggestion.
Regarding the second issue, I suggest you use a similar approach:
- Hook to the OnClientProgressStarted and set a global variable indicating that the upload has already started.
- Hook to the OnClientClick event of the upload button and verify the state of the global variable. If it is true, return false from the function to stop the form submission; otherwise return true.
<body> |
<script type="text/javascript"> |
var uploadIsInProgress = false; |
function clientProgressStarted(sender, eventArgs) { |
uploadIsInProgress = true; |
} |
function doUpload() { |
if (uploadIsInProgress) { |
return false; |
} |
return true; |
} |
</script> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<div> |
<telerik:RadUpload ID="RadUpload1" runat="server"></telerik:RadUpload> |
<telerik:RadProgressArea ID="RadProgressArea1" runat="server"></telerik:RadProgressArea> |
<telerik:RadProgressManager ID="RadProgressManager1" runat="server" OnClientProgressStarted="clientProgressStarted" /> |
<asp:Button ID="Button1" runat="server" Text="Upload" OnClientClick="doUpload();" /> |
</div> |
</form> |
</body> |
I hope this helps.
All the best,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
gives me the following error:
Error 1 Operator '&=' cannot be applied to operands of type 'Telerik.WebControls.ProgressIndicators' and 'Telerik.Web.UI.Upload.ProgressIndicators'
Error 2 Cannot implicitly convert type 'Telerik.Web.UI.Upload.ProgressIndicators' to 'Telerik.WebControls.ProgressIndicators'. An explicit conversion exists (are you missing a cast?)
Here is my reply to the other forum post:
It seems you have references to both RadUpload for ASP.NET (RadUpload.Net2.dll) and RadControls for ASP.NET Ajax (Telerik.Web.UI.dll). Please, remove the redundant using clause. By the way, you could remove the reference to the redundant assembly also (e.g. RadUpload.Net2).
Best,
Erjan Gavalji
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Best wishes,
Erjan Gavalji
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.