This is a migrated thread and some comments may be shown as answers.

Progress Indicators Not Working

12 Answers 663 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 03 Oct 2008, 06:22 PM
I'm having problems with the ProgressArea control working properly. I have started with the basics of adding RadUpload, RadProgressManger, and RadProgressArea to my form.

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

Sort by
0
Helen
Telerik team
answered on 06 Oct 2008, 01:11 PM
Hello Mark,

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.
0
Mark
Top achievements
Rank 1
answered on 06 Oct 2008, 03:47 PM
Sorry, no luck. I created a new local virtual directory and dropped your sample there. The only thing I changed was the TargetPhysicalForlder attribute to point to a remote server. I then selected a 3.5 MB file to upload. The process took around 15 seconds to complete. At no time did the progress control display.

Thanks,

Mark
0
Helen
Telerik team
answered on 07 Oct 2008, 08:29 AM
Hello 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.
0
Paul
Top achievements
Rank 1
answered on 10 Oct 2008, 12:29 AM
I am seeing the same problem but it only occurs in my dev environment when using Visual Studio 2008 and the 3.5 framework.  If I run a (F5) debug session which uses Visual Studio's internal web server (ASP.NET Development Server 9.0.0.0) I don't see the progress indicator.

If I deploy to my test server, I see the progress indicator.

Regards,

Paul
 
0
Lee Wilson
Top achievements
Rank 1
answered on 10 Oct 2008, 10:45 AM
I'm having the same problem.

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.
0
Erjan Gavalji
Telerik team
answered on 10 Oct 2008, 11:19 AM
Hi gyus,

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.
0
Paul
Top achievements
Rank 1
answered on 10 Oct 2008, 07:17 PM

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

0
Lee Wilson
Top achievements
Rank 1
answered on 13 Oct 2008, 08:23 AM

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!

0
Simon
Telerik team
answered on 14 Oct 2008, 11:53 AM
Hello Lee Wilson,

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.
0
Yasser
Top achievements
Rank 1
answered on 11 Nov 2008, 10:25 AM
RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount;

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?) 
0
Erjan Gavalji
Telerik team
answered on 11 Nov 2008, 11:37 AM
Hi Yasser,

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.
0
bharti ten
Top achievements
Rank 1
answered on 24 Feb 2010, 07:22 AM
Hello telerik team,

I am using Rad upload along with Progress area and manager.

I am uploading 5 files at a given time. if after validation i use "clear" buttons, it is
some how .. disabling the rad progress indicator from showing. 

Suppose, i select 3 invalid files and 2 valid files. and client side validation is done.. and error message is displayed..
then i clear the invalid files, 
Now i hit "upload", files are getting uploaded but  progress indicators are not showing up,

Please help.

Thank you,
Bharathi
Tags
Upload (Obsolete)
Asked by
Mark
Top achievements
Rank 1
Answers by
Helen
Telerik team
Mark
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Lee Wilson
Top achievements
Rank 1
Erjan Gavalji
Telerik team
Simon
Telerik team
Yasser
Top achievements
Rank 1
bharti ten
Top achievements
Rank 1
Share this question
or