[CLOSED] [1.0] Ext.NET with Telerik's RadUpload control

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] [1.0] Ext.NET with Telerik's RadUpload control

    We're trying to use Telerik's RadUpload control within an Ext.NET project, because it offers a live progress bar, indicating the progress of the uploaded file (see example here: http://demos.telerik.com/aspnet-ajax...defaultcs.aspx), however it doesn't work within our Ext.NET project when the "DirectRequestModule" is in the Web.Config file.

    This is how the web.config file looks:

        <httpHandlers>
          <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" validate="false" />
          <add path="Telerik.RadUploadProgressHandler.axd" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI" validate="false" />
          <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
        </httpHandlers>
        <httpModules>
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />
            <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
        </httpModules>
    As soon as the "DirectRequestModule" tag is removed, the progress bar works fine. So we're assuming it's causing some sort of conflict with Telerik.

    As part of the upload process, Telerik's control successfully calls "/Telerik.RadUploadProgressHandler.axd" to check the progress of the file upload, but the upload progress isn't returned with the callback response. Looking at the web.config, I can't see how Ext.NET would conflict with it, but it appears to be.

    Are you aware of anything which might be causing Ext.NET to intercept/override the Telerik progress bar? Any tips of things to try would be much appreciated.

    Cheers,

    Dan
  2. #2
    Hi,

    Can you prepare test sample with required assemblies and send it to support email?
  3. #3
    Thanks, I've just e-mailed you a small project which replicates the problem.

    Dan
  4. #4
    Hi,

    I don't see you mail. What email box did you use?
    Please use support at ext dot net
  5. #5
    Sorry, you should receive it in the next few minutes - it was blocked by our outgoing mail server due to it containing code files.

    Thanks

    Dan
  6. #6
    Hi,

    I guess the problem in Telerik control (may be because I have no access to the Telerik source)
    I was able to reproduce the problem without DirectRequestModule, just add the following code to the Global.asax.cs
    void Application_PostAcquireRequestState(object sender, EventArgs e)
        {
            if (HttpContext.Current != null && HttpContext.Current.Request != null)
            {
                string value = HttpContext.Current.Request["Key"];
            }
        }
  7. #7
    But if I remove the following line from "DirectRequestModule.cs" in the Ext.Net project and recompile the DLLs, the progress bar works fine with the "DirectRequestModule" added in my web.config, so doesn't that mean something within the OnPostAcquireRequestState in Ext.Net is overriding Telerik's request?

        public partial class DirectRequestModule : IHttpModule
        {
            /// <summary>
            /// 
            /// </summary>
            [Description("")]
            public void Init(HttpApplication app)
            {
                //app.PostAcquireRequestState += OnPostAcquireRequestState;  <<<<<<<< IF THIS THIS LINE HERE IS COMMENTED OUT, THE TELERIK PROGRESS BAR WORKS FINE.
                app.PreSendRequestHeaders += RedirectPreSendRequestHeaders;
                app.ReleaseRequestState += AjaxRequestFilter;
            }
    ...
    Thanks,

    Dan
  8. #8
    Hi,

    In the OnPostAcquireRequestState we check one value from HttpContext.Current.Request collection. As I demonstrated in the previous post, reading from HttpContext.Current.Request collection breaks Telerik functionality. I am not sure why is it happens because I don't know how Telerik control is implemented
  9. #9
    Ok, thanks, I see what you mean now with the HttpContext.Current.Request object breaking it.

    I've just changed the Ext.NET DirectRequestModule code to the following, and it appears to work fine now, however I'm just doing some tests to ensure that the rest of the Ext.Net functionality works as expected:

    [Description("")]
        public partial class DirectRequestModule : IHttpModule
        {
            /// <summary>
            /// 
            /// </summary>
            [Description("")]
            public void Init(HttpApplication app)
            {
                if (!app.Context.CurrentHandler.IsNull())
                {
                    string zpHandler = app.Context.CurrentHandler.GetType().ToString();
    
                    if (!zpHandler.Contains("WebResource.axd"))  // Don't append the Ext.NET handler if the current handler is a Telerik one
                    {
                        app.PostAcquireRequestState += OnPostAcquireRequestState;
                    }
                }
    
                app.PreSendRequestHeaders += RedirectPreSendRequestHeaders;
                app.ReleaseRequestState += AjaxRequestFilter;
            }
    ...
    Assuming this doesn't break the rest of Ext.NET in our app, do you know of a nicer way of doing the above? i.e. Is there something similar you can add in the code to prevent other users from experiencing the same issue in the future?

    Many thanks,

    Dan
  10. #10
    Hi,

    I was just wondering if you'd managed to look at my previous post - do you know if there's a more generic fix which can be implemented by yourselves (i.e. by checking the current handler), so Ext.NET doesn't append the "OnPostAcquireRequestState" event in certain circumstances?

    I could look at ways of overriding some of the Ext.NET code in my project, however I don't want to do that in case a future Ext.NET update has significantly different code.

    Many thanks,

    Dan
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] [1.0] telerik report with Ext.NEt directEvents
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 29, 2010, 6:07 PM
  2. Coolite vs Telerik vs DevExpress
    By ys.liew in forum Open Discussions
    Replies: 2
    Last Post: Dec 21, 2009, 9:01 PM
  3. Replies: 2
    Last Post: Aug 27, 2009, 8:12 AM
  4. Replies: 10
    Last Post: May 05, 2009, 1:50 PM
  5. Replies: 1
    Last Post: Oct 13, 2008, 12:42 PM

Posting Permissions