Support forums

AjaxUploader Upload button not firing correctly

Last post 03-18-2008, 12:08 AM by Adam. 7 replies.
Sort Posts: Previous Next
  •  03-15-2008, 7:50 PM 37997

    AjaxUploader Upload button not firing correctly

    I have downloaded AjaxUploader and finally managed to get it incorporated into my ASP.NET 3.5 application.  However when using FireFox 2.0 I have to click on the "Upload" button twice to get the panel containing the browse button to display, further more it fires a number of JavaScript "Object expected" errors when I try it with Internet Explorer 7.0 and it renders a basic ASP.NET upload control.  The same issues are also experienced when I run any of the demos locally, however running the online demos I don't get any problems.  I'm running Vista Business, Visual Studio 2008 (with ASP.NET 3.5 extensions and targetting v3.5 of the .NET Framework), I would be surprised if it's a framework or VS thing though.  Has anyone experienced similar issues or know any fixes?

  •  03-17-2008, 2:10 AM 38016 in reply to 37997

    Re: AjaxUploader Upload button not firing correctly

    Are you using Framework 2.0-VB\simple-upload.aspx file? The example file does have a problem with it. We just fixed it. Please download the control again.
    keep me posted.
    Web Messenger: wysiwyg editor:
    asp wysiwyg html editor: Image Gallery:
    Live Support:

  •  03-17-2008, 4:28 AM 38024 in reply to 37997

    Re: AjaxUploader Upload button not firing correctly

    I found a solution. I created a Visual Studio 2005 Web Application project and added all the files supplied with the simple-upload (C#) sample, compiling this and running it the Upload button event now fires correctly, displaying the browse button and label correctly.  My understanding of this is that if you run the samples in isolation, i.e. by just browsing to the file location i.e. simple-upload.aspx or browsing to a website pointing to the file location the Demo.master master page isn’t picked up and rendered with the page, meaning the InitAjaxPanel()method is never called.  I would suggest that you include VS project files with the samples to resolve this issue.

  •  03-17-2008, 6:02 AM 38030 in reply to 38024

    Re: AjaxUploader Upload button not firing correctly

    Glad to know you resolved this issue and thanks for the nice suggestion.
    We will include the VS projects as soon as possible.
    Web Messenger: wysiwyg editor:
    asp wysiwyg html editor: Image Gallery:
    Live Support:

  •  03-17-2008, 12:40 PM 38050 in reply to 38030

    Re: AjaxUploader Upload button not firing correctly

    Rather frustratingly I still can't get this working within my project.  I am not generating the ASP.NET ScriptManager and  UpdatePanel controls dynamically like within the InitAjaxPanel() method within the examples.  My control hierarchy is as follows
            AjaxTabContainer (Ajax Control Toolkit)
                AjaxTabPanel (Ajax Control Toolkit)
    I was thinking it could be an issue with the AjaxUploader being within the Ajax Control Toolkit Tab Panel so I pulled the AjaxUploader out to reside within an Update Panel within the ScriptManager control but still no luck.
    Could you explain exactly how to initialise the AjaxUploader control when simply adding it to the page as opposed to the dynamic loading as within the Demos?


  •  03-17-2008, 1:05 PM 38051 in reply to 38050

    Re: AjaxUploader Upload button not firing correctly

    Can you try the following code?
    <%@ Page Language="vb"%>
    <%@ Register Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" TagPrefix="CuteWebUI" %>

            <form runat="server">
          <asp:ScriptManager ID="ScriptManager1" runat="server">
          <asp:UpdatePanel ID="UpdatePanel1" runat="server">
         <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Upload File">
          <VALIDATEOPTION MaxSizeKB="10240" />

    Keep me posted Chat
    Web Messenger: wysiwyg editor:
    asp wysiwyg html editor: Image Gallery:
    Live Support:

  •  03-17-2008, 5:30 PM 38060 in reply to 38051

    Re: AjaxUploader Upload button not firing correctly

    Right, I created a new page within my existing application called AjaxUploader.aspx and copied that code in, I still get the exact same issue, Internet Explorer has JavaScript errors and FireFox doesn't render the browse button on the initial partial page reload. 
    I thought it must be something to do with my references (as I have had to reference CuteWebUI.AjaxUploader.dll so that I can reference it in m code behind) or web.config configuration.  I deleted all references and re-copied the CuteWebUI.AjaxUploader.dll and
    double checked my web.config settings, then I remembered that IIS 7.0 had forced me to run the APPCMD.exe command line to migrate my web.config so the application is compatible with the application pool Integrated .NET mode, see below for a summary of the HTTP 500.0 error
    I received (remember this is Vista, IIS 7.0, Visual Studio 2008, .NET 3.5 environment)

    "Description: This application is running in an application pool that uses the Integrated .NET mode. This is the preferred mode for running ASP.NET applications on the current and future version of IIS.

    In this mode, the application should not specify ASP.NET module components in the <system.web>/<httpModules> configuration section. Instead, it should use the <system.webServer>/<modules> configuration section to load ASP.NET module components. You have the following options:
    1) Migrate the application to work with the Integrated .NET mode (PREFERRED).
    You can migrate the application configuration, including the contents of the <httpModules> configuration section, by using the following from a command line window (the window must be running as Administrator):

    %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "UploaderTest/"

    After you migrate your application, it will run in both Classic and Integrated .NET modes, as well as on downlevel platforms."

    I then had a thought and changed my web application properties to "Use Visual Studio Development server" instead of IIS and low and behold the issues were resolved.  So it looks like it's an out the box incompatibility with my particular environment, primarily the IIS 7.0
    configuration.  I switched my web application properties back to use IIS and investigated.  I created a new "Integrated" managed pipeline application pool and still got the same error, however switching the managed pipeline to "Classic" resolved the issue and solved all the issues,
    however MS suggest against this option as the rest of the error message received earlier states:

    "2) Move this application to an application pool using the Classic .NET mode.
    You can move the application to the default application pool using the Classic .NET mode by running the following from an command line window (the window must be running as Administrator):

    %systemroot%\system32\inetsrv\APPCMD.EXE set app "UploaderTest/" /applicationPool:"Classic .NET AppPool"

    Alternatively, you can use any other application pool on your system that is running in the Classic .NET mode. You can also use the IIS Administration tool to move this application to another application pool.

    It is preferred that you migrate this application by using option 1 to take advantage of the benefits provided by the Integrated .NET mode.

    Error Code: 0x80070032 "

    With a bit of Googling and a crash course in IIS 7.0 Modules and Handlers I found the solution that solves the problems I was experiencing while still allowing the suggested "Integrated" managed pipeline application pool.
    When I ran the command within option 1 of the HTTP 500.0 error above i.e.
    %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "UploaderTest/" the following was added to my web.config file under <system.webServer><modules> <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader" preCondition="managedHandler"/>
    removing the preCondition="managedHandler" attribute and reloading the page soleved the Firefox and IE issues, for those still interested I found the information that gave me the solution here

    "For modules, if you set preCondition=”managedHandler” in the <module> entry, the module will only run for managed requests (a managed request is a request that has a managed handler).  If you omit this, the module will run for all requests.  Managed modules in the <modules> section are only called if you're running in the integrated pipeline.  If you're running in classic mode, then <httpModules> is used."

    I hope this helps others out as it seems to be an issue with the APPCMD.EXE tool assuming you have a managed handler for all modules.

  •  03-18-2008, 12:08 AM 38063 in reply to 38060

    Re: AjaxUploader Upload button not firing correctly

    Thanks for the detailed description of the issue. This will help other developers a lot. Chat
    Web Messenger: wysiwyg editor:
    asp wysiwyg html editor: Image Gallery:
    Live Support:

View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems