This is a migrated thread and some comments may be shown as answers.

RadUpload AJAX callback error

5 Answers 111 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Missing User
Missing User asked on 15 Jan 2013, 11:04 AM
Hello there,
I'm working on a project wich use Telerik RadControls. 
Since many days we are facing the same problem.
None of the solutions we found in forums worked.
You are our last chance !
We have to upload a file and we still get the same error message (see on : msq_erreur.png). 
We're working with Visual Studio 2010, and IIS 7.5 on a Seven 64 bits computer.
We try all the trick that are exposed on this page : 
http://www.telerik.com/help/aspnet-ajax/upload-configuration.html
And it still doesn't work. We also try to activate the "IIS 6 Compatibilty components" but nothing change.
I give you our web.config file :
<?xml version="1.0"?>
  <configSections>
    <section name="openaccess" type="OpenAccess.Config.ConfigSectionHandler, OpenAccess.Config.20, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342"/>
  </configSections>
  <appSettings>
    <add key="XXXX-Track.ConnectionString" value="server=.\XXXXXXXXX;database=XXXXXXXXX;uid=XXXX;pwd=_XXXX1"/>
    <add key="XXXX-Export.ConnectionString" value="server=.\XXXXXXXXX;database=XXXXXXXXX;uid=XXXX;pwd=_XXXX1"/>
    <add key="XXXXXXXXX.ConnectionString" value="server=.\XXXXXXXXX;database=XXXXXXXXX;uid=XXXX;pwd=_XXXX1"/>
    <add key="XXXX-Securite.ConnectionString" value="server=.\XXXXXXXXX;database=XXXXXXXXX;uid=XXXX;pwd=_XXXX1"/>
    <add key="XXXX-eReleve.ConnectionString" value="server=.\XXXXXXXXX;database=XXXXXXXXX;uid=XXXX;pwd=_XXXX1"/>
    <add key="XXXX-eReleve.OLEDBConnectionString" value="Provider=SQLOLEDB;Server=.\XXXXXXXXX;Database=XXXXXXXXX;Uid=XXXX; Pwd=_XXXX1"/>
    <add key="Ns-EVENTS.ConnectionString" value="server=.\XXXXXXXXX;database=TRACK_EVENTS;uid=XXXX;pwd=_XXXX1"/>
    <add key="TermPicker.NavigateUrl" value="../XXXXXXXXX/ViewSingleTopic.aspx?TTop_PK_ID="/>
    <add key="Ns-XForms.ConnectionString" value="Data Source=.\XXXXXXXXX;Initial Catalog=Ns-Forms;Persist Security Info=True;User ID=XXXX;Password=_XXXX1"/>
    <add key="Ns-XForms.OLEDBConnectionString" value="Provider=SQLOLEDB;Data Source=.\XXXXXXXXX;Initial Catalog=Ns-Forms;User ID=XXXX;Password=_XXXX1"/>
    <add key="Telerik.RadUpload.TempFolder" value="XXXXXXXXX"/>
  </appSettings>
  <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="XXXXConnectionString1" connectionString="Data Source=XXXX-DATA;Initial Catalog=XXXX;Integrated Security=True" providerName="System.Data.SqlClient"/>
    <add name="XXXXConnectionString" connectionString="server=.\XXXXXXXXX;database=XXXX;uid=XXXX;pwd=_XXXX1" providerName="System.Data.SqlClient"/>
    <!--<add name="XXXXXXXXXConnectionString" connectionString="Data Source=.\XXXXXXXXX;Initial Catalog=XXXXXXXXX;uid=XXXX;pwd=_XXXX1" providerName="System.Data.SqlClient"/>-->
  </connectionStrings>
  <location path="APP_WebServices">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path=".">
    <system.web>
      <webServices>
        <protocols>
          <add name="HttpGet"/>
          <add name="HttpPost"/>
        </protocols>
      </webServices>
      <httpRuntime maxRequestLength="8192"/>
      <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="*" path="Telerik.RadUploadProgressHandler.aspx" type="Telerik.WebControls.RadUploadProgressHandler, RadUpload.Net2"/>
        <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/>
        <add verb="*" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
        <add verb="*" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
        <add verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>
        <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/>
        <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>
        </httpHandlers>
      <httpModules>
        <add name=" RadUploadModule" type=" Telerik.WebControls.RadUploadHttpModule, RadUpload.Net2"/>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />     
      </httpModules>
      <customErrors mode="Off"/>
      <globalization enableClientBasedCulture="true" culture="auto" uiCulture="auto"/>
      <compilation debug="true" defaultLanguage="vb">
        <assemblies>
          <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          <add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          <add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          <add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          <add assembly="Telerik.Web.UI, Version=2009.01.0527.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>
        </assemblies>
        <buildProviders>
          <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
        </buildProviders>
        <codeSubDirectories>
          <add directoryName="VBCode"/>
          <add directoryName="CSCode"/>
        </codeSubDirectories>
      </compilation>
      <trace enabled="false" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true"/>
      <authentication mode="Forms">
        <forms name=".XXXX" loginUrl="Login.aspx" timeout="120"/>
      </authentication>
      <authorization>
        <deny users="?"/>
      </authorization>
      <pages maintainScrollPositionOnPostBack="true"/>
    </system.web>
  </location>
  <openaccess xmlns="http://www.vanatec.com/OpenAccess">
    <references/>
    <connections>
      <connection id="DatabaseConnection1">
        <databasename>XXXX</databasename>
        <servername>localhost</servername>
        <integratedSecurity>True</integratedSecurity>
        <backendconfigurationname>mssqlConfiguration</backendconfigurationname>
      </connection>
    </connections>
    <backendconfigurations>
      <backendconfiguration id="mssqlConfiguration" backend="mssql">
        <mappingname>mssqlMapping</mappingname>
      </backendconfiguration>
    </backendconfigurations>
    <mappings current="mssqlMapping">
      <mapping id="mssqlMapping"/>
    </mappings>
  </openaccess>
  <system.webServer>
 
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="integratedMode" />
      <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </modules>
    <handlers>
      <add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
      <add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
      <add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
      <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode" />
      <add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI"  preCondition="integratedMode" />
      <remove name="WebServiceHandlerFactory-Integrated" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />
    </handlers>
    <defaultDocument>
      <files>
        <add value="login.aspx"/>
      </files>
    </defaultDocument>
  </system.webServer>
</configuration>
We hope you can help us.
Best Regards.

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 18 Jan 2013, 09:24 AM
Hi Lopez,

 
You can test this web page that we tested at our side at your side and if it works properly adjust your web config accordingly? 

Hope this will be helpful.

Greetings,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Missing User
answered on 29 Jan 2013, 11:42 AM
Hello,

I've tried your solution but the application show me the same error.
Do you have another idea?

Best regards.
0
Plamen
Telerik team
answered on 01 Feb 2013, 10:06 AM
Hello Lopez,

 
I have tested the Web Site I attached once again but unfortunately could not observe the same error. Here is  video of my test. Please review it and let me know if I am not testing properly or I have to do or add something else to observe it.

Kind regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Missing User
answered on 05 Feb 2013, 05:12 PM
Hello,
First, thanks for the time you spent on our problem.
I've tried your solution on my computer and it's worked fine. However I don't use the same tools as you.
So I give you a screen shot of the aspx code we use, a screen shot of our bin folder and our vb code. 

Imports Telerik.WebControls
 
Partial Class _Default
    Inherits System.Web.UI.Page
 
    Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)
 
        If Not Page.IsPostBack Then
 
            'Do not display SelectedFilesCount progress indicator.
            RadProgressArea1.ProgressIndicators = RadProgressArea1.ProgressIndicators And Not ProgressIndicators.SelectedFilesCount
 
            RadProgressArea1.Localization("UploadedFiles") = "Done " ' /// <Effectuer
            RadProgressArea1.Localization("TotalFiles") = ""
            RadProgressArea1.Localization("CurrentFileName") = "File: " ' /// <Fichier:
 
            Dim progress As RadProgressContext = RadProgressContext.Current
            'Prevent the secondary progress from appearing when the file is uploaded (FileCount etc.)
            progress("SecondaryTotal") = "0"
            progress("SecondaryValue") = "0"
            progress("SecondaryPercent") = "0"
 
        End If
 
    End Sub
 
    Private Sub buttonSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles buttonSubmit.Click
        Dim strFileNameOnServer As String
        Dim strBaseLocation As String
        'Throw New Exception(inputFile.UniqueID.ToString())
        Dim file As UploadedFile = RadUploadContext.Current.UploadedFiles(inputFile.UniqueID)
 
        If Not (file Is Nothing) Then
 
            strBaseLocation = System.AppDomain.CurrentDomain.BaseDirectory & "App_TempFiles\" ' System.AppDomain.CurrentDomain.BaseDirectory &
            strFileNameOnServer = System.IO.Path.GetFileName(file.FileName)
 
 
            LooongMethodWhichUpdatesTheProgressContext(file)
        End If
 
 
        If Not file Is Nothing Then
            file.SaveAs(Server.MapPath("~\App_TempFiles\" & file.GetName))
            'Response.Write(Server.MapPath("~\App_TempFiles\" & file.GetName))
            txtOutput.InnerHtml = "Upload <b>" & strBaseLocation & strFileNameOnServer & "</b> successed" 'reussi
            Session("UploadImportFileNname") = strBaseLocation & strFileNameOnServer          
 
            lblFileSize.Text = "File size: " & CStr(file.ContentLength) & " bytes"
 
        End If
 
 
    End Sub 'buttonSubmit_Click
 
 
    Private Sub LooongMethodWhichUpdatesTheProgressContext(ByVal file As UploadedFile)
        Const total As Integer = 100
 
        Dim progress As RadProgressContext = RadProgressContext.Current
 
        Dim i As Integer
        For i = 0 To total - 1
            progress("SecondaryTotal") = total.ToString()
            progress("SecondaryValue") = i.ToString()
            progress("SecondaryPercent") = i.ToString()
            progress("CurrentOperationText") = file.GetName() + " is being processed..."
 
            If Not Response.IsClientConnected Then
                'Cancel button was clicked or the browser was closed, so stop processing
                Exit For
            End If
 
            'Stall the current thread for 0.1 seconds
            System.Threading.Thread.Sleep(100)
        Next i
    End Sub 'LooongMethodWhichUpdatesTheProgressContext
 
End Class

I am new on this project and I hope you can help me again.

Best regards.
0
Plamen
Telerik team
answered on 08 Feb 2013, 09:36 AM
Hi,

 
In such scenario we recommend using RadUpload control. 

Regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Upload (Obsolete)
Asked by
Missing User
Answers by
Plamen
Telerik team
Missing User
Share this question
or