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

RADProgress Manager works on Dev machine but not Server

19 Answers 270 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Robert O'Dell
Top achievements
Rank 1
Robert O'Dell asked on 25 Nov 2009, 11:06 PM
Hi,
I have an application that uses the RADprogress Manager.  On my dev machine, it works fine, during the file upload the progress bar appears and updates.  I move the application to my production server and the file uploads but no progress area.  In reviewing the forums and other support, I've done/checked the following
- Ensure the two registrations are in web.config (the prod srv is the same - I just change the connection string after I load it)
- No Ajax
- tried setting trust level="Full"
- updated to latest assemblies

I did not try registering the assembly in the GAC, as I run several other website on the server and was uncertain of the effect on them.

The production server is windows 2003 with IE 6.  It is a dedicated server, not shared.  The browser is IE 8.  My dev environment is Windows XP, Visual Studio 2008.

The only two differences I can see beyond the OS difference is that on the produciton server, the website runs as a Virtual Directory under a second website that does not have the appropriate registrations in the web.config.  I didn't purse that further since upload works.  I assume that wouldn't work if it wasn't  seeing the registrations
The other difference is the production server is running dotDefender as an application firewall.  That firewall has not caused any other code issues..

Thanks for you help,
Bob

19 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 27 Nov 2009, 10:51 AM
Hi Robert O'Dell,

The registrations in the web.config have nothing to do with the actual file upload. They are only for the sake of the progress area. I have the following suggestions:

1) Can you try to disable the firewall and check whether the area will appear when uploading, say 20 mb file?
2) Check whether you have any HttpModules that are catching on the HttpContext.
3) Just for the purpose of testing, can you try to add the needed handler/module to the parent site web.config?
4) I have prepared very simple upload application that works on all common cases. Can you try to attach it in the same way as your real application and observe whether there is a progress bar visible. If there is no progress, this shall mean that the problem lays somewhere in the parent site.

Kind regards,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
vtech
Top achievements
Rank 1
answered on 02 Dec 2009, 01:27 AM
Hi Genady,

I've got the same challenge.   Thanks for the demo.  I did as you suggested and installed it on a fresh virtual directory, and also ensure there was no web.config at the root of the web.

Two things:
1)  I've installed Telerik into the GAC, and had to add the full spec to all the references in web.config
<add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI, Version=2008.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"   validate="false" />

instead of:

<add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI"   validate="false" />

..do I get around this via adding Telerik to machine.config?

and

2) file goes up, but still no progress manager visible.

Clues:

I know that RadUploadProgressHandler is working, as I use firefox/firebug, and I can see it returning this every few seconds:
var rawProgressData = {InProgress:true,ProgressCounters:true,CurrentOperationText:'testfile.zip',PrimaryTotal:'1.31MB',PrimaryValue:'455.39kB',PrimaryPercent:'34',SecondaryValue:'0',Speed:'41.02kB/s',TimeElapsed:'10921',TimeEstimated:'21761',OperationComplete:'false',RadUpload:{RequestSize:1372628,Bytes:466324,FilesCount:0,CurrentFileName:'testfile.zip',RequestLength:1372628}};

But no progress manager displayed?    Seems like a client side visibility thing?

Hope you can help - love your products, and your friendly patient support.   :-)

[edit] p.s. Can't find a PM button, or I would send you the link to test...  :-)



0
Genady Sergeev
Telerik team
answered on 03 Dec 2009, 01:34 PM
Hello vtech,

As I can see you are using Q3 2008. Unfortunately this version is not compatible with FireFox 3.5. You need to upgrade at least to Q2 2009 in order to have the area visible under FF 3.5

Best wishes,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert O'Dell
Top achievements
Rank 1
answered on 05 Dec 2009, 04:28 AM
Genady,
Thanks for the input.  Here's what I tried
The registrations in the web.config have nothing to do with the actual file upload. They are only for the sake of the progress area. I have the following suggestions:

1) Can you try to disable the firewall and check whether the area will appear when uploading, say 20 mb file?
 That I can't turn off.  We are using a CISCO hardware firewall and there is really no practical way of taking that out of the loop.  I did turn off dotDefender which was the web application firewall (after taking a Zantac) and tried it - no luck.

2) Check whether you have any HttpModules that are catching on the HttpContext.
Not sure what you suggesting here, can you enlighten me a little

3) Just for the purpose of testing, can you try to add the needed handler/module to the parent site web.config?
Tried that to no avail.  I also went to another site and modified the base web.config and added the web page directly.  Same result
As a third test, I went to a second server added the test you sent and had the exact same result

4) I have prepared very simple upload application that works on all common cases. Can you try to attach it in the same way as your real application and observe whether there is a progress bar visible. If there is no progress, this shall mean that the problem lays somewhere in the parent site.
Tried this at the same level, and modified a web site so it was not a virtual directory, still no luck.

Some observations from this round.
Uploading a 30MB file, the progress manager actually appears -- but when the upload is done!!  The page actually never finishes loading, the green bar shows all the ways across, but the rotating circles - rotates and rotates.  But as I said the files actually uploaded completely.

I tried uploading several very small files.  In that case, the progress manager never appeared (but that might be correct in this case) and the page did fully complete providing the completion message (this was my program not your test).  Other suggestions?
Thanks,
Bob
0
Genady Sergeev
Telerik team
answered on 10 Dec 2009, 10:11 AM
Hi Robert O'Dell,

I am a little bit confused, what do you mean by:

"The page actually never finishes loading, the green bar shows all the ways across, but the rotating circles - rotates and rotates"

Do you use any templates for the progress area? By default there are no circles, your description looks like the description of an ajax indicator. Is this what you see? In additon, the fact that the area appears after the file upload means that there is some process running in the background that keeps the progress context. Are you sure that you don't have any methods in the code-behind that interact with the progress area context?  Something like the following:

RadProgressContext context = RadProgressContext.Current;
        context.SecondaryTotal = 200;
 
        for (int i = 0; i < 200; i++)
        {
            //Progress bar               
            int percentIncrement = Convert.ToInt32(i * 100 / rgCount);
            context.SecondaryValue = (i + 1).ToString();
            context.SecondaryPercent = percentIncrement.ToString();
            context.CurrentOperationText = (i + 1).ToString();
        }

All the best,

Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert O'Dell
Top achievements
Rank 1
answered on 16 Dec 2009, 11:46 PM
Genady,
Sorry, What I meant by the rotating circles was the small rotating circle that appears in the place of the IE log on the browser tab for the page.  It's nothing in my code.

Now for your questions "is it something in my code behind"  I'm pretty sure not.  I've included the pertinent code below.  The only other code is some logging and configuration which are not active during the load.
 #region Load and Save Data  
      
    protected void UpdateStatus(object sender, EventArgs e)  
    {  
        BindValidResults();  
        BindInvalidResults();  
        lblTaskStatus.Text += "Process Complete";  
        lblTaskStatus.Visible = true;  
    }  
 
    #endregion  
 
    #region Handle File Uploads  
    private void BindValidResults()  
    {  
        if (RadUpload1.UploadedFiles.Count > 0)  
        {  
            foreach (UploadedFile validFile in RadUpload1.UploadedFiles)  
            {  
                string targetFolder = Server.MapPath(DPFields.ImagePath.Batch);  
                validFile.SaveAs(Path.Combine(targetFolder, validFile.FileName), true);  
                lblTaskStatus.Text += validFile.FileName + " uploaded successfully<br />";  
           }  
        }  
    }  
    private void BindInvalidResults()  
    {  
        if (RadUpload1.InvalidFiles.Count > 0)  
        {  
            lblError.Text += " fcnt=" + RadUpload1.InvalidFiles.Count.ToString();  
            foreach (UploadedFile invalidFile in RadUpload1.UploadedFiles)  
            {  
                lblTaskStatus.Text += "<span style=\"color: red'\"" + invalidFile.FileName+  " Load Failed!</span><br />";  
            }  
        }  
    }  
    #endregion 

The aspx page itself is also very simple.  Here's the full content area for it.
<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="Server">  
<asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label> 
     <div style="text-align: center;">  
        <h2>Batch Upload of Sample Files</h2> 
    </div> 
    <p>Please keep the total file size under 200MB</p> 
        <telerik:RadProgressManager ID="RadProgressManager1" runat="server" />          
        <asp:Table ID="tblUpload" runat="server">  
            <asp:TableRow> 
                <asp:TableCell>Files</asp:TableCell> 
                <asp:TableCell> 
                    <telerik:RadUpload ID="RadUpload1" Width="700" InputSize="50" 
                     runat="server" AllowedFileExtensions=".gif,.jpg,.jpeg,.flv" 
                      ControlObjectsVisibility="ClearButtons,AddButton">  
                    </telerik:RadUpload> 
                </asp:TableCell> 
            </asp:TableRow> 
        </asp:Table> 
        <br /><br /> 
        <asp:Label ID="lblTaskStatus" runat="server"></asp:Label> 
        <telerik:RadProgressArea ID="RadProgressArea1" runat="server">  
        </telerik:RadProgressArea>          
        <br /><br /> 
        <asp:Table ID="Table1" runat="server" Width="100%">  
        <asp:TableRow> 
            <asp:TableCell HorizontalAlign="Left">  
                <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="UpdateStatus" /> 
            </asp:TableCell> 
            <asp:TableCell HorizontalAlign="Right">  
                <asp:Button ID="btnReturn1" runat="server" Text="Admin Menu" OnCommand="GoTo" CommandArgument="ADMIN" /> 
            </asp:TableCell> 
        </asp:TableRow> 
        </asp:Table> 
</asp:Content> 
 
Let me know if there is anything else I can try.
Thanks for the help,
Bob
0
Genady Sergeev
Telerik team
answered on 19 Dec 2009, 08:56 AM
Hi Robert O'Dell,

I am starting to think that this is indeed client side visibility problem. Everything else looks normal and since the ProgressHandler is returning correct information there should be progress area visible. Which browser do you use? Here is an easy way to check whether this is a client side problem:

protected void Page_Load(object sender, EventArgs e)
    {
        UpdateProgressArea();
    }
 
    private void UpdateProgressArea()
    {
        //Set the RadProgressContext values which will be serialized on the client.
        //The values set here are just as an example
        RadProgressContext progress = RadProgressContext.Current;
        progress["PrimaryTotal"] = string.Format("{0} bytes", 1000);
        progress["PrimaryValue"] = string.Format("{0} bytes", 600);
        progress["PrimaryPercent"] = "60";
        progress["SecondaryPercent"] = "30";
        progress["CurrentOperationText"] = "MyTestFileMyTestFileMyTestFileMyTe stFileMyTestFile MyTestFileMyTestFile.txt";
        progress["SecondaryTotal"] = string.Format("{0} file(s)", 1);
        progress["SecondaryValue"] = string.Format("{0} file(s)", 0);
        progress["Speed"] = "30KB/s";
        progress["TimeEstimated"] = "0:0:20s";
        progress["TimeElapsed"] = "0:0:3s";
 
        StringWriter writer = new StringWriter();
        progress.Serialize(writer);
 
        string script = string.Format(@"function displayProgressAreas() {{ {1};$find('{0}').update(rawProgressData);}}",
                    RadProgressArea1.ClientID, writer.GetStringBuilder().ToString());
        string script1 = "Sys.Application.add_load(function(){ displayProgressAreas();});";
        string script2 = String.Concat("<script type='text/javascript'> ", script, script1, " </script>");
 
        ClientScript.RegisterStartupScript(this.GetType(), "DisplayProgressAreas", script2, false);
    }

Copy and paste this code to your page. Then change RadProgressArea1 to the ID of your RadProgressArea. Is there progress area present on initial load of the page?

Kind regards,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert O'Dell
Top achievements
Rank 1
answered on 22 Dec 2009, 05:41 AM
The progress does appear on the initial page load when I included the code you sent.  Just for the heck of it.  I continued the process and uploaded a file.  The image never changed, but that might be what is expected.

I'm using IE 8
I also tried Safari and FireFox and they both exhibited the exact same behavior as IE 8 (I did this before making the change you suggested.)

Does that shed any light on this?
Thanks for you patience and help,
Bob
0
Genady Sergeev
Telerik team
answered on 25 Dec 2009, 07:33 AM
Hi Robert O'Dell,

This is really confusing, since the handler sends the upload data to the client there should be progress area visible. Have you tried to inspect your page with FireBug or IEToolBar and manually set display="block" to the RadProgressArea div?  I have the following suggestions:

1) Add a button to your aspx page and the following code for its event handler:
protected void btnStart_Click(object sender, EventArgs e)
    {
        int rgCount = 200;
        RadProgressContext context = RadProgressContext.Current;
        context.SecondaryTotal = 200;
 
        for (int i = 0; i < 200; i++)
        {
            //Progress bar               
            int percentIncrement = Convert.ToInt32(i * 100 / rgCount);
            context.SecondaryValue = (i + 1).ToString();
            context.SecondaryPercent = percentIncrement.ToString();
            context.CurrentOperationText = (i + 1).ToString();
 
            if (!Response.IsClientConnected)
            {
                //Cancel button was clicked or the browser was closed, so stop processing
                break;
            }
 
            // simulate a long time performing the current step
            System.Threading.Thread.Sleep(1000);
 
        }
    }
}

Is there progress area visible when you press the button?

2) Hook on the client side ProgressUpdating event of the RadProgressManger. Thena add the following as a handler:

<script type="text/javascript">
    function ProgressUpdating(sender, args) {
        alert(args.ProgressData.PrimaryPercent);
    }
</script>

If there is correct result as a PrimaryPercent, the problem should sort of client side visibility thing. Do you have  Live URL where we can observe the problem?

Regards,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
MD
Top achievements
Rank 1
answered on 31 Dec 2009, 05:59 PM
I'm experiencing this same issue where the progress area never turns visible and I'm able to see the requests piling up in Firebug or any other monitoring tool with this in the reponse "var rawProgressData = {InProgress:false,ProgressCounters:false};".  Even when manually changing the display to "block" to get the progress area to show up it never displays any valid progress data (see attachment).
0
MD
Top achievements
Rank 1
answered on 04 Jan 2010, 05:04 PM
It appears to act as if there isn't any progress and nothing is uploading when in fact the upload is occurring and without error.
0
Genady Sergeev
Telerik team
answered on 06 Jan 2010, 11:24 AM
Hi MD,

Your case is not the same as Robert's. The JSON that you receive from the server, "var rawProgressData = {InProgress:false,ProgressCounters:false}", indicates that there is no progress monitoring performed at all. I suggest that you open a support ticket and provides us with detailed information regarding your case. This will help you to troubleshoot the problems that you experience faster.

Best wishes,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert O'Dell
Top achievements
Rank 1
answered on 17 Jan 2010, 03:01 AM
Genady,
The first test you asked me to try was adding the btnStart_Click and a button to call it. I Tried that and it came up fine on the production server.  It would go from 1 to 200 perfectly.  (I did change it 50 to shorten after the first test - and  that continued to work fine).

The second test was attaching to the OnClientProgressUpdating event.  That worked fine on my dev machine, On the production server it did not, I did not get any alert there.  In all cases the test file I'm uploading was loaded correctly.  I've been using a test file of approximately 13MB.

One interesting note.  On my postback (the update button), I put a call to you btnStart_Click as the first statement.  What happened there is the file uploaded (with no progress manager).  After which the progress manager appeared from the btnStart_Click.  When you go to the test page below, that link has been removed.

To reach the test page.  The URL is:
http://www.einfostrategies.com/docspopuli/uploadtest/BatchSampleUpload3.aspx

Thanks for the help,
Bob

0
Genady Sergeev
Telerik team
answered on 21 Jan 2010, 09:55 AM
Hi Robert O'Dell,

Can you please open a support ticket and send your web.config to us? After a lot of researching we are somewhat confused on what might be the cause of the area not appearing. Do you have global.asax file in your app? We have managed to reproduce a similar problem but when there is an HttpModule attached to an event of the HttpApplication object that is fired earlier than the event the area hooks on. The area's module hooks on PreRequestHandlerExecute. As far as I can see from the live URL you use IIS6.0. Do you have any ISAPI filters applied?

All the best,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
james
Top achievements
Rank 1
answered on 25 Jan 2010, 11:02 PM
Good evening,

I am experiencing the same issues described in this post - has there been any resolution to this?

I implement the example as per the demo code (http://demos.telerik.com/aspnet-ajax/upload/examples/customprogress/defaultcs.aspx)
and implement the http handlers and httpRuntime sections in the web.config.

I have tested this on three seperate servers now (internal and discountasp) and they all come up with the same symptoms - the page hangs until the file has been posted fully without showing any progress / progress area - then it clicks in and the progress is shown.

FYI I'm developing my solution in .net 2.0
0
Robert O'Dell
Top achievements
Rank 1
answered on 30 Jan 2010, 02:15 AM
I will open a support ticket over the weekend. 
0
Genady Sergeev
Telerik team
answered on 02 Feb 2010, 01:41 PM
Hello james

The issue that you experience is not the same. The problem is that you have followed the custom progress demo. It performs custom progress, not file upload monitoring. Therefore you see the area after the upload has finished. This demo is really misleading, therefore we will change it for the next release.

Greetings,
Genady Sergeev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
drickey
Top achievements
Rank 1
answered on 05 Mar 2010, 09:53 PM
Hi, I am having the same problem as described above. I have a progress area that works correctly on my dev machine but after uploading to the production server, progress area doesn't work.  The file, however, is still uploaded correctly.  There are no errors when the upload is ran.  I added the code you suggested for checking to see if the progress area will display itself manually and it will.

Was a resolution ever found to roberts problem?

Thanks,
David
0
Genady Sergeev
Telerik team
answered on 09 Mar 2010, 05:37 PM
Hello drickey,

No, since we were not able to reproduce the problem on out side. Do you have sample project that reproduces the problem and can be test locally? If so, please open a support ticket and send it to use so that we can investigate on what is going wrong.

Despite that, there might be numerous of reasons for the area not appearing. Can you provide us with more information regarding your scenario. Which version of IIS do you use, do you upload large or small files, is the area inside UpdatePanel/AjaxPanel?

Greetings,
Genady Sergeev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Upload (Obsolete)
Asked by
Robert O'Dell
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
vtech
Top achievements
Rank 1
Robert O'Dell
Top achievements
Rank 1
MD
Top achievements
Rank 1
james
Top achievements
Rank 1
drickey
Top achievements
Rank 1
Share this question
or