RadUpload Ajax callback error

Thread is closed for posting
8 posts, 0 answers
  1. jeljeljel
    jeljeljel avatar
    12 posts
    Member since:
    Nov 2006

    Posted 04 Jul 2011 Link to this post

    Hi, I am trying to upgrade a project to use MVC and .NET 4.  It used the RadUploadProgressHandler just fine, but now I am getting an error.  I have seen numerous posts about this and how to fix it, but the fixes just don't seem to be working for me.  

    The error has something to do with route registration.  This is the current state of that in my global.asax.cs...
    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
        routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");
     
        routes.MapRoute(
                    "Default", // Route name
                    "{controller}/{action}/{id}", // URL with parameters
                    new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );
    }


    I have attached the current state of my web.config.  Can someone help me with the correct settings to get this to work please?

    <?xml version="1.0" encoding="UTF-8"?>
        <system.web>
            <httpModules>
                <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/>
                <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            </httpModules>
            <httpHandlers>
                <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI"/>
                <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" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
            </httpHandlers>
            <httpRuntime maxRequestLength="102400" executionTimeout="3600"/>
            <compilation defaultLanguage="c#" debug="true" targetFramework="4.0">
                <assemblies>
                    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
     
                    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add assembly="System.Web.Abstractions,Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
     
     
                </assemblies>
            </compilation>
            <customErrors mode="Off" defaultRedirect="~/error.aspx">
                <error statusCode="404" redirect="~/errorPageNotFound.aspx" />
            </customErrors>
            <membership defaultProvider="BWMembershipProvider">
                <providers>
                    <clear />
                    <add name="BWMembershipProvider" type="BigWave.Web.BWMembershipProvider" />
                </providers>
            </membership>
            <authentication mode="Forms">
                <!--timeout is set to a value greater than a day.  acual timeout value is controlled by the cookie set during the login process-->
                <forms name="BigWave" loginUrl="login.aspx" defaultUrl="default.aspx" protection="All" timeout="200" slidingExpiration="true" path="/; HttpOnly" />
            </authentication>
            <authorization>
                <allow users="*" />
            </authorization>
            <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
            <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="45"/>
            <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
            <pages viewStateEncryptionMode="Never" enableEventValidation="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
                <namespaces>
                    <add namespace="System.Web.Helpers" />
                    <add namespace="System.Web.Mvc" />
                    <add namespace="System.Web.Mvc.Ajax" />
                    <add namespace="System.Web.Mvc.Html" />
                    <add namespace="System.Web.Routing" />
                    <add namespace="System.Web.WebPages" />
                </namespaces>
            </pages>
        </system.web>
        <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules>
                <remove name="ScriptModule"/>
                <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <!-- *******  Register the RadUploadModule for IIS 7  ****** -->
                <add name="RadUploadModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule" />
            </modules>
            <handlers>
                <remove name="ScriptHandlerFactory"/>
                <remove name="ScriptHandlerFactoryAppServices"/>
                <remove name="ScriptResource"/>
                <remove name="WebServiceHandlerFactory-Integrated"/>
                <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.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=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <!-- *******  Register the RadUploadProgressHandler for IIS 7  ****** -->
                <add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />
            </handlers>
        </system.webServer>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <dependentAssembly>
                    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
                    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
        <location path="Telerik.RadUploadProgressHandler.ashx">
            <system.web>
                <authorization>
                    <allow users="*" />
                </authorization>
            </system.web>
        </location>
    </configuration>
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 08 Jul 2011 Link to this post

    Hello Jeljeljel,

    I suggest that you take a look at the following help article for instructions on how to register the handler for using in ASP.NET MVC.

    Best wishes,
    Genady Sergeev
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. jeljeljel
    jeljeljel avatar
    12 posts
    Member since:
    Nov 2006

    Posted 08 Jul 2011 Link to this post

    I saw that post, but the AXD thing didn't make sense to me.  I tried it and it didn't work.

    My version of the control is 2008.03.1105.35.  Is that compatible with MVC?
  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 14 Jul 2011 Link to this post

    Hello Jeljeljel,

    The idea to change the extension of the handler from ashx to axd. Then the HandlerUrl property of RadAjaxManager should be set to point to the new handler. If upon uploading large file (more than 50mb) the area still does not show it is possible that the version that you use  is not supported in MVC.

    Kind regards,
    Genady Sergeev
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  6. jeljeljel
    jeljeljel avatar
    12 posts
    Member since:
    Nov 2006

    Posted 31 Jul 2011 Link to this post

    Ok, thanks for the info.

    You mention use of the RadAjaxManager, however I am not using that.  Instead I am using a RadProgressManager and a RadProgressArea.

    For a page, I have code that typically goes as follows...

    
    
    radProgressManager = new RadProgressManager();
    radProgressManager.ID = "radProgressManager";
    _primaryDiv.Controls.Add(radProgressManager);
     
    row = AddRow(outerTable);
    cell = AddCell(row);
    cell.ColumnSpan = 2;
     
    radProgressArea = new RadProgressArea();
    radProgressArea.ID = "RadProgressArea";
    radProgressArea.EnableEmbeddedSkins = false;
    radProgressArea.Skin = "BigWave";
    radProgressArea.DisplayCancelButton = false;
     
    //Do not display SelectedFilesCount progress indicator.
    radProgressArea.ProgressIndicators = ProgressIndicators.CurrentFileName |
                                           ProgressIndicators.TimeElapsed |
                                           ProgressIndicators.TotalProgress |
                                           ProgressIndicators.TotalProgressBar;
     
    radProgressArea.Localization.UploadedFiles = "Progress: ";
    radProgressArea.Localization.TotalFiles = String.Empty;
    radProgressArea.Localization.CurrentFileName = String.Empty;
    cell.Controls.Add(radProgressArea);

    I am not setting any specific HandlerUrl or any url for that matter.  It seems this is an important element.  How would I use the above classes to point to an alternate url?
  7. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 03 Aug 2011 Link to this post

    Hi Jeljeljel,

    Pardon me, It is my mistake. I mean RadProgressManager, not RadAjaxManager. You can use the HandlerUrl property to set url to the handler. So, you can set Telerik.RadUploadProgressHandler.axd to it.

    All the best,
    Genady Sergeev
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  8. jeljeljel
    jeljeljel avatar
    12 posts
    Member since:
    Nov 2006

    Posted 27 Aug 2011 Link to this post

    Ok, just now getting back to this.  I don't have a HandlerUrl property on my RadProgressManager.  Is this something new?
  9. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 01 Sep 2011 Link to this post

    Hi Jeljeljel,

    It turned out that the property is named AjaxUrl, not HandlerUrl. Here is a sample usage:

    <telerik:RadProgressManager AjaxUrl="Telerik.RadUploadProgressHandler.axd" />

    Kind regards,
    Genady Sergeev
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017