locked
Uploading files with AjaxFileUpload fails RRS feed

  • Question

  • User-1986993521 posted

    Hi

    I am using AjaxControlToolKit component, AjaxFileUpload. Maximum number of files is set to 1. After clicking Upload button, I receive following errors:

    • In Firefox: "HTTP/1.1 404 Not found" plus "uncaught exception: error raising upload complete event and start new upload"
    • In Chrome: ERR_CONNECTION_RESET (nothing more is given!)

    No query string(s) in page, no complex code(s) and no limitation(s) in server (ASP.NET Development Server on local machine). Full access to saving path (except prevention of direct access from browser to the save folder via authorization tag in web.config, which I have already used in another project with no problems, but not combined with this component. I am pretty sure that this isn't the issue as execution process never reaches UploadComplete point). I searched the net and found more than 50 posts and links all saying paddling with web.config done the trick, but none worked for me. I added/removed/edited any line recommended by those posts with no success.

    Any ideas?

    Tuesday, September 9, 2014 11:58 PM

Answers

  • User-417640953 posted

    Hi ubuntu118,

    "uncaught exception: error raising upload complete event and start new upload"

    With above error message, I think you have not add the "AjaxFileUploadHandler" properly. Please make sure your web.config file

    contains below sections:

    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <httpRuntime targetFramework="4.5" maxRequestLength="42949672" />
        <httpHandlers>
          <add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
        </httpHandlers>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <handlers>
          <add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="4294967295"/>
          </requestFiltering>
        </security>
      </system.webServer>
    </configuration>

    Thanks.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 11, 2014 10:44 PM

All replies

  • User-417640953 posted

    Hi ubuntu118,

    "uncaught exception: error raising upload complete event and start new upload"

    With above error message, I think you have not add the "AjaxFileUploadHandler" properly. Please make sure your web.config file

    contains below sections:

    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <httpRuntime targetFramework="4.5" maxRequestLength="42949672" />
        <httpHandlers>
          <add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
        </httpHandlers>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <handlers>
          <add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="4294967295"/>
          </requestFiltering>
        </security>
      </system.webServer>
    </configuration>

    Thanks.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 11, 2014 10:44 PM