Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > AsyncUpload > Custom Handler scenario throwing an error

Answered Custom Handler scenario throwing an error

Feed from this thread
  • 1zias01 avatar

    Posted on Feb 27, 2011 (permalink)

    I implemented a basic custom handler similar to the  Custom Handler demo on this page:

    http://demos.telerik.com/aspnet-ajax/upload/examples/async/imageuploader/defaultcs.aspx?product=asyncupload

    However every time I try to upload a file the visual studio debugger pops up a couple different client errors and takes me a spot in the telerik.web.ui.webresoure_2.axd  dynamic file to a specific line:

    if(!e){throw"Error while uploading, "+i;

    The pop error messages are:

    Microsoft JScript runtime error: Unhandled Error in Silverlight Application The remote server returned an error: NotFound.   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
       at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at UploadPrototype.MainPage.ProcessResponse(IAsyncResult asyncResult)
       at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

    AND

    Microsoft JScript runtime error: Unhandled Error in Silverlight Application Failed to Invoke: _onSilverlightError.   at System.Windows.Browser.ScriptObject.Invoke(String name, Object[] args)
       at UploadPrototype.EventManager.SilverlightError(String message, Int32 index)
       at UploadPrototype.MainPage.<>c__DisplayClass1f.<ProcessResponse>b__18()


    Some help please.

    Reply

  • Answer Genady Sergeev Genady Sergeev admin's avatar

    Posted on Mar 1, 2011 (permalink)

    Hello Chris Zias,

    Can you please post your handler declaration as well as the RadAsyncUpload markup so that we can take a look. Also, which version of telerik do you use?

    Regards,
    Genady Sergeev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!

    Reply

  • 1zias01 avatar

    Posted on Mar 1, 2011 (permalink)

    Sorry I found the answer in another post.  My .ashx was not compiling corectly.  The namespace was not correct.  But it works now thanks!

    Reply

  • Anas avatar

    Posted on Jan 23, 2012 (permalink)

    Hi

    I'm getting this same error.
    I've added the following handler to the web.config:

    <add name="Telerik.Web.UI.WebResource.axd" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2011.3.1115.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" /> 

     

    The RadAsyncUpload markup I'm using is:

    <telerik:RadAsyncUpload ID="tlrkRadAsyncUpload1" runat="server" InitialFileInputsCount="1" MaxFileSize="524288000" OnClientFileUploadFailed="onUploadFailed" /> 
     

     And I'm not using a custom handler.

    Thanks

    Reply

  • Derrick avatar

    Posted on Mar 8, 2012 (permalink)

    I have my own HTTP handler which is interfering with the Telerik handlers.

    Here is my handler configuration section from my web.config:

        <httpModules>
            <add type="MetroLinx.Web.MetroLinxHttpModule" name="MetroLinxHttpModule" /> 
        </httpModules>
        <httpHandlers>
           <add verb="*" path="*js.axd" type="MetroLinx.Web.MetroLinxHttpHandler" /> 
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
          <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
          <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />

        </httpHandlers>

    What can I change so my handler will work side by side with Telerik's handlers?

    Reply

  • Genady Sergeev Genady Sergeev admin's avatar

    Posted on Mar 13, 2012 (permalink)

    Hello Derrick,

    Please move your handler declaration after the declaration of the telerik handlers. This is needed because you have * in the path for your handler. This means that it will gather all requests for .axd files, including ones that are for the Telerik handlers.

    Moving its declaration at the end will force asp.net to try to match the request to one of our handlers first, and only if there is no mach, forward it to your custom handler.

    Greetings,
    Genady Sergeev
    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.

    Reply

  • Derrick avatar

    Posted on Mar 13, 2012 (permalink)

    Thanks.  Will try that too.

    I did find a way of getting this to work be doing the following:

    Replacing the Telerik Script Manager and update panels with the regular AJAX script manager and update panels included with the AJAX control toolkit for ASP.NET 4.0.

    I also removed the Telerik AJAX RAD manager control.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > AsyncUpload > Custom Handler scenario throwing an error
Related resources for "Custom Handler scenario throwing an error"

ASP.NET AsyncUpload Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]