Custom Handler scenario throwing an error

7 posts, 1 answers
  1. 1zias01
    1zias01 avatar
    12 posts
    Member since:
    Sep 2012

    Posted 27 Feb 2011 Link to this post

    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.

  2. Answer
    Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 01 Mar 2011 Link to this post

    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!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. 1zias01
    1zias01 avatar
    12 posts
    Member since:
    Sep 2012

    Posted 01 Mar 2011 Link to this post

    Sorry I found the answer in another post.  My .ashx was not compiling corectly.  The namespace was not correct.  But it works now thanks!
  5. Anas
    Anas avatar
    1 posts
    Member since:
    Jan 2012

    Posted 23 Jan 2012 Link to this post

    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
  6. Derrick
    Derrick avatar
    17 posts
    Member since:
    Jul 2011

    Posted 08 Mar 2012 Link to this post

    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?
  7. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 13 Mar 2012 Link to this post

    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.
  8. Derrick
    Derrick avatar
    17 posts
    Member since:
    Jul 2011

    Posted 13 Mar 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017