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

Minifier stuck on "extracting" message

7 Answers 111 Views
Telerik Minifier
This is a migrated thread and some comments may be shown as answers.
Jonx
Top achievements
Rank 2
Jonx asked on 12 Feb 2011, 08:59 PM
Hello,
I tried to upload my xap... I select it and all it does is says extracting...
Even after several hours.
I tried in different browsers.
My xap is 3MB big... compiled with the latest assemblies.
It would be nice to see a progression somewhere.
Progression at uploading the file etc... ha! but maybe it's working localy?
Anyway it's not working.

Something else...
Note that this could be a nice occasion to implement something I was looking for while using the radupload control.
I would like to be able to give feedback about what is happenning on the server once my file is uploaded.
I mean I have a systeme where I upload files and then import them in the system. This can be a lengthy task.
There should be a way to give feedback between the moment where my file is uploaded and where my file is handled...

Thanks anyway,
Did I say it is not working? Just kidding...

John.

7 Answers, 1 is accepted

Sort by
0
Accepted
Miro Miroslavov
Telerik team
answered on 17 Feb 2011, 09:08 AM
Hello John,

 This is a know issue with the Xap Minifier. Please vote for it in our PITS system in order to increase it's priority.

About the Upload I think this is some kind of business logic and less Control logic. I believe you should implement this in your own.

Best wishes,
Miro Miroslavov
the Telerik team
0
Jonx
Top achievements
Rank 2
answered on 17 Feb 2011, 03:01 PM
Hi Miro,
I voted for making it work...

For the upload, maybe it's not the place to discuss that issue but maybe I'm wrong but this is something I cannot do.
The upload control does upload the file, goes from 0 to 100%, then only I get access to the file.
If then it takes two minutes to handle the file, the upload progress is already at 100%
and even there I cannot report progress on my operation because I don't have the callbacks to do it.
Maybe they exist but I don't know them ;)
Any idea?
Thank you for your help,
John.
0
Alex Fidanov
Telerik team
answered on 22 Feb 2011, 09:13 AM
Hi John,

Regarding existing callback on the server side of the RadUpload (RadUploadHandler), you can override the SaveChunkData method. There, you can check IsFinalFileRequest() or IsFinalUploadRequest() methods and check if the file is uploaded. In such case, you can create your own callback and give the proper feedback.

All the best,
Alex Fidanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jonx
Top achievements
Rank 2
answered on 22 Feb 2011, 11:38 AM
Hello Alex,
That you for your suggestion but this does not correspond to what I need.

What I need comes after the final request...

I mean the SaveChunkData will give me progression while uploading the file. Nice but this is something I already have while uploading the file. You already give a file progress at upload... What I want comes after the file has been uploaded.
For exemple if the file is an excel file whith 5000 customers info that I need to import...
The problem I get is that the upload takes a couple of seconds but then after I've reached 100% comes the handling of the file.
And this takes times. A couple of minutes. A couple of minutes while I'm stuck at 100% upload already. And this is a problem.

I would like to be able to say after the file has been uploaded where I'm at updating my customers...
And display something like the following events list:
- Upload the file from 1% to 100% (this what I have thanks to you)
- File uploaded successfully
- Starting customer import
- Importing customers from 1 to 5000
- Import successfull

You see?
I don't know if the radupload relies on the savechunkdata to display real time progression or if it has it's own way to check the progression on the client but I need to get access to the upload progression to be able to inject my custom events...
I hope I was more clear this time, sorry for my bad english. I can make a sketch in case it's still not clear...

Thank you for your help,
Like always ;)
John.
0
Alex Fidanov
Telerik team
answered on 25 Feb 2011, 10:19 AM
Hello John,

I understand your scenario. Once the handler has sent a final file request message, you have no further control over this. The same is true while the handler is processing the requests. If you want to be able to send message to the SL client in these scenarios, you would have to do this outside the upload or the handler. I am not sure that there is a reasonable approach for this scenario within the upload/handler.

Greetings,
Alex Fidanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jonx
Top achievements
Rank 2
answered on 21 Mar 2011, 06:35 PM
Hello Alex,
Now that I have implemented the feedback macanism myself, I can assure you that there is definitely something that you could help us on...
I'm in a scenario where I'm using RIA WCF Services...
What I have done for now is use a radupload to upload my file, in the handler I have my routine that is importing the file to my database line by line. the import routine in givin some sort of feedback and I'm using a local silverlight pooling calling my remote domain service to see where I'm at in the progress of the import...

This was pretty hard to do as the first problem I had was the fact that the RIA domain service does not have access to the asp.net session because it's missing the implementation of the IRequiresSessionState interface. This is not trivial to implement. I found some lead but was unable to implement them:
http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/
That means I'm out of luck to easily report progress for my current import. I'm using the application object to store my total/progress like that:
public static void CacheSet(string key, object value)
        {
            //use the current user name to be able to store objects for the current user
            string user = HttpContext.Current.User.Identity.Name;
            string currentKey = String.Format("{0}_{1}", user, key);
            HttpContext.Current.Application[currentKey] = value;
        }

Then I have a method in my service that I can call from the Silverlight side:
public string GetUploadProgress(string type)
        {
            switch (type)
            {
                case Const.Upload.Type.Beneficiairy:
                    return String.Format("{0}:{1}", SiteUtils.CacheGet(Const.Upload.Beneficiaire.Current), SiteUtils.CacheGet(Const.Upload.Beneficiaire.Total));
                     
                case Const.Upload.Type.Command:
                    return String.Format("{0}:{1}", SiteUtils.CacheGet(Const.Upload.Command.Current), SiteUtils.CacheGet(Const.Upload.Command.Total));
                     
                case Const.Upload.Type.CommandXXXX:
                    return String.Format("{0}:{1}", SiteUtils.CacheGet(Const.Upload.CommandXXXX.Current), SiteUtils.CacheGet(Const.Upload.CommandCG42.Total));
 
                default:
                    return "1:1";
            }
        }

And then from my Silverlight page I call:
public ImportCommandXXXXWindow()
        {
            InitializeComponent();
 
            timer.Tick += new EventHandler(timer_Tick);
            timer.Interval = new TimeSpan(0, 0, 15);
        }
 
        void timer_Tick(object sender, EventArgs e)
        {
            SoContext ctx = new SoContext();
 
            InvokeOperation<string> invokeOp = ctx.GetUploadProgress(Const.Upload.Type.CommandXXXX, OnInvokeCompleted, null);
        }
 
        private void OnInvokeCompleted(InvokeOperation<string> invOp)
        {
            if (invOp.HasError)
            {
                invOp.MarkErrorAsHandled();
            }
            else
            {
                string[] progress = invOp.Value.Split(':');
                if (progress != null && progress.Count() == 2)
                {
                    int current;
                    int total;
                    if (int.TryParse(progress[0], out current) && int.TryParse(progress[1], out total))
                    {
                        radBusyIndicator.ProgressValue = current * 100d / total;
                    }
                }
            }
        }

It's working but it willd become a mess very fast once I get more imports to handle...
- There is lot's of code to write on both sides of the channel
- The GetUploadProgress call seems to be stuck for a while and starts to return
successfuly only after a minute or two
- You can't share data easily between the domain service and the httphandler...
- Too much hassle for a slow and complicated solution in the end...

And I have to do all this when I think it could be offered by the radupload control...

You see the radupload control has already a way to talk between the Silverlight client and the httphandler on the server.

All you got to do is give me the possibility to use the communication channel to pass data throught it...

Maybe this is already possible?

All I need is eventually an event that will let me report progress in my import routine and also a way to tell in SaveChunkData or elsewhere that the upload is not finished until I say it is finished. For example by using the AddReturnFileParam and a sppecial RadUploadConstants constant...

Is there a way to say the upload is not finished until I say so by using one of your parameter? That way, the upload control will continue to check for progress and I will feed him with whatever simple data (string) I want and once I'm done I pass him a last parameter to say we are done... et voila...

Lot's of text only to ask you the latest question... how to make that the radUpload continues to check for progress even after the file is fully uploaded? One litle thing that would solve it all...

Any help on that please?

Eventually tell me and I'll ask the question in the radupload forum ;)

Thanks a lot in advance,
John.
0
Alex Fidanov
Telerik team
answered on 24 Mar 2011, 05:02 PM
Hi John,

I apologize for the delayed response. I looked at the code once again and I was not able to find a way to achieve this from outside the RadUpload. As far as the upload handler is concerned, the file is uploaded as soon as the last bytes of the file's stream are saved. Once the handler reports this progress, the RadUpload cleans up all the uploaders used to upload this file, thus closing the connection. Using an external channel seems to be the only solution right now.

Kind regards,
Alex Fidanov
the Telerik team
Tags
Telerik Minifier
Asked by
Jonx
Top achievements
Rank 2
Answers by
Miro Miroslavov
Telerik team
Jonx
Top achievements
Rank 2
Alex Fidanov
Telerik team
Share this question
or