Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AjaxControlToolkit: error raising upload complete event and start new upload

When using the April 2013 AjaxControlToolkit I receive the error:

0x800a139e - JavaScript runtime error: error raising upload complete event and start new upload

When trying to upload a file using the AjaxFileUpload control.

like image 599
Adam Avatar asked May 29 '13 12:05

Adam


3 Answers

Make sure the following stuff should be present in web.config.

<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>
like image 176
sridharnetha Avatar answered Nov 07 '22 14:11

sridharnetha


To resolve the error you need to add this

<httpHandlers>
  <add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
</httpHandlers>

in your

<system.web>

section of your web.config

like image 26
Adam Avatar answered Nov 07 '22 14:11

Adam


If your app pool is set to classic then this happens unless you use precondition=”integratedMode” added to httphandler for system.webserver

<add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" preCondition="integratedMode"/>
like image 3
Clay Smith Avatar answered Nov 07 '22 15:11

Clay Smith