SlickUpload
Welcome Guest Search | Active Topics | Log In | Register

Error handling and callback timeouts Options
broster
#1 Posted : Tuesday, January 10, 2012 6:00:36 PM
Rank: Newbie

Groups: Registered

Joined: 2/7/2006
Posts: 5

We upgraded to 5.5.11 for our current product release and everything has been working great. I’ve got something wrong with my error handling though and could use a pointer in the right direction. I noticed that when the form posts it uses an AJAX callback. If that request gets a server error (ex. My DB is offline or something like that), my progress dialog stays at 100% forever. In previous versions of SlickUpload the entire page was posted so that errors got caught by ASP.NET and redirected to my custom error page. Now, the AJAX callback returns the error but nothing is handling it.

Is there a way to enable the old behavior of posting the whole page? Alternatively, is there a way for me to catch the error from the AJAX call and handle it properly?

I have one other question about timeouts. I also noticed a callback taht was taking several minutes due to some long running queries after the upload. Are there timeouts that govern how long the callback will wait before timing out?

 

Thanks,

Brian

Axosoft
#2 Posted : Wednesday, January 11, 2012 2:46:51 PM
Rank: Administration


Groups: Administrators

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

Are you using ASP.NET AJAX or normal webforms? SlickUpload should use a regular submit for both the upload and completion postback, unless you have it configured differently. It submits the upload to a hidden iframe, then submits the regular form after the upload has completed.

Is there any way you can send me an example project, or a url to a page that reproduces the problem so I can track it down from this end?

broster
#3 Posted : Friday, January 13, 2012 7:19:06 AM
Rank: Newbie

Groups: Registered

Joined: 2/7/2006
Posts: 5

I had some success addressing the two issues I mentioned

1. The error handling was not occurring: I think this was just user error on my part. My development environment has the customErrors attribute in the web.config set to "RemoteOnly". When I set that to "On" my error page was loading as expected.

2. Control over the timeouts: Due to some long running operations after the upload the AJAX call was timing out after 90 seconds. This was easily fixed by increasing the timeout on the ScriptManager. The timeout defaults to 90 (seconds) so it just has to be set to something that makes sense for your app

<asp:ScriptManager runat="server" AsyncPostBackTimeout="300" />

So things seem to be working for me but I am still curious why the AJAX callback occurs. The SlickUpload control is in an ASP.NET UpdatePanel that has a few AsyncPostBackTrigger definitions. None of the controls in these definitions are for starting the upload. They just handle changing around the UI a bit.

The part that actually submits the upload is a button that calls some Javascript which validates some of the other input elements on the page and when it is done calls the submit() method on the SlickUpload control.

The page with the control has a bunch of dependencies so I don't have a nice simple example of it that I could send you. I'll try and boil it down to the basics and send that along when I get a chance. In the meantime maybe there is enough info here to figure out why the AJAX callback occurs.

Thanks,
Brian

Axosoft
#4 Posted : Wednesday, January 18, 2012 1:03:47 PM
Rank: Administration


Groups: Administrators

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

Ahh. So when the upload completes, it initiates a postback on the page (to trigger the UploadComplete event). Since you're using UpdatePanel's, it's an async postback rather than a normal one.

SlickUpload does allow you to do a fully AJAX completion (without a postback), but that won't trigger the UploadComplete event -- instead, it executes a handler that you specify to handle the completion.

Have you looked at the PostProcessing example? Assuming your AsyncPostBackTimeout is high enough, that may give you an idea of how you can display progress information during your long running upload completion operation.

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.