Welcome Guest Search | Active Topics | Sign In | Register

AJAXUploader stops working after Upload button click Options
Daniele
Posted: Tuesday, October 6, 2009 9:27:22 AM
Rank: Newbie
Groups: Member

Joined: 9/3/2009
Posts: 5
Hi all,

I'm experiencing a strange behavior of the uploader.
When I try to upload a large file (~40M), sometimes, not always, the uploader doesn't start working. When I click on the upload button, the button becomes disabled, but the progress bar doesn't show anything and the cancel button remains disabled. If I try to click on some other control in the page I get the "in_progress" error, and later I get the timeout error.

I thought it could be depending on the file size, but sometimes, with the same file, the upload is successful, so I think I could exclude some request-size problem. But! This problem doesn't happen in my development environment (my localhost), it happens only when I try to upload a file in a different machine then mine, so when there's a http comunication.

An oddity I've just noticed: during this strange behavior, the cancel button is disabled except for some milliseconds every random seconds. In other words: button disabled, ten seconds pass, button enabled for an istant and then button disabled, 15 seconds pass and button enabled again for an istant, and so on until the timeout. It smells to me like an hunged connection.

Any suggestions?
Thank you,
Daniele

This is the relevant part of my code (the destination directories are set):
Code: HTML/ASPX
<script type="text/javascript">
        function error_handler(control, error, message) {
            if (error == "extension_not_allowed")                
                alert('blahblahblah');
            else
                alert('blahblahblah');
        }
    </script>

<eo:AJAXUploader ID="UploaderRic" runat="server" BrowseButtonText="Sfoglia..."
                                            CancelButtonText="Cancella" UploadButtonText="Carica" width="400" 
                                            AllowedExtension="pdf" ClientSideOnError="error_handler" 
                                            ProgressTextFormat="Caricamento in corso - {percentage}%"
                                            AutoPostBack="true" PostedFileLabelFormat="{posted_file_name}" 
                                            MaxFileCount="1">
                                            <LayoutTemplate>
                                                <table>
                                                    <tr>
                                                        <td style="text-align:left" >
                                                            <asp:PlaceHolder ID="InputPlaceHolder" runat="server">Input Box Place Holder</asp:PlaceHolder>
                                                        </td>
                                                        <td style="text-align:right">
                                                            <asp:Button ID="UploadButton" runat="server" Text="Carica" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                    </tr>
                                                    <tr>
                                                        <td style="text-align:left">
                                                            <eo:ProgressBar ID="ProgressBar" runat="server" Width="330" ControlSkinID="Windows_XP" />
                                                        </td>
                                                        <td style="text-align:right">
                                                            <asp:Button ID="CancelButton" runat="server" Text="Annulla" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server">Progress Text Place Holder</asp:PlaceHolder>
                                                             
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-right: 5px; text-align:left;">
                                                            <asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server">Posted Files</asp:PlaceHolder>
                                                             
                                                        </td>
                                                        <td style="text-align:'right'">
                                                             <asp:Button ID="DeleteButton" runat="server" Text="Elimina" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </LayoutTemplate>
                                        </eo:AJAXUploader>
eo_support
Posted: Tuesday, October 6, 2009 10:00:13 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Your code looks fine. Please try to update to the latest version first. Then check the uploader with a blank project. Once you get that working, you can try to compare the blank project with your project, particular if you have any other HttpModules in your project's web.config that could interfere with the uploader. You may also want to try using a different browser to see whether it has to do with your particular browswer.

Thanks!


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.