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

another "Handler not found" error

13 Answers 411 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Rich Gouette
Top achievements
Rank 1
Rich Gouette asked on 16 Dec 2009, 09:22 PM
Full Error text reads:
Handler not found or execution of the handler failed. The remote server returned an error: NotFound". 

Silverlight v3.0, with IIS 6.0
RadUploadHandler is referenced within the web project

I have created a folder in the web project called "attachments"
My XAML for the control looks like this:
<telerikInput:RadUpload x:Name="radUpload" Margin="8,61,23,188"     TargetFolder="attachments" UploadServiceUrl="~/RadUploadHandler.ashx"
<telerikInput:RadUploadItem Height="55" Width="344"/> 
</telerikInput:RadUpload> 

ashx file contains:
<%@ WebHandler Language="VB" CodeBehind="RadUploadHandler.ashx.vb" Class="AEMRrequestForm.Web.RadUploadHandler" %> 

Code behind for above reads:
Imports System 
Imports System.Web 
 
Namespace SilverlightApp.Web 
    Public Class RadUploadHandler 
        Inherits Telerik.Windows.RadUploadHandler 
    End Class 
End Namespace 

both .ashx and folder are at the same level as the web project






13 Answers, 1 is accepted

Sort by
0
jtby
Top achievements
Rank 1
answered on 18 Dec 2009, 12:17 PM
I have the exact same problem with the exact same code.  I did follow the KB article troubleshooting raduploadhandler, and also followed the example simple uplooad application. Only difference was I used VB and not C#, so my code looks identical to yours posted, not the example simple upload. 
0
Rich Gouette
Top achievements
Rank 1
answered on 18 Dec 2009, 02:45 PM
hey, if you'd like to e-mail one on one, maybe to tag team on this, feel free
gouetr@mmc.org
Rich

0
Frank
Top achievements
Rank 1
answered on 18 Dec 2009, 02:46 PM

Hi,

If you run the project in IIS, then I think the UploadServiceUrl has to point to ~/myweb/RadUploadHandler.ashx
where myweb is the virtual directory of the handler.
You can use Fiddler to trace the url where the RadUlpload thinks the handler is.
Cheers.

0
Rich Gouette
Top achievements
Rank 1
answered on 18 Dec 2009, 02:57 PM
I tried :
UploadServiceUrl="~/MyWebAppName/RadUploadHandler.ashx"

with no change in results

Is that what you meant?
Rich
PS. All I get outta FIDDLER is:

"An application error occurred on the server"




0
Frank
Top achievements
Rank 1
answered on 18 Dec 2009, 09:06 PM

Hi Rich,

In addition to the virtual path the problem can also be with your namespace definitions.

You have Class="AEMRrequestForm.Web.RadUploadHandler"   directive in your handler page but your class is surrounded by the SilverlightApp.Web .

Try removing the namespace definition from the class or specify a valid class path.

I guess  in your case it should be AEMRrequestForm.Web.SilverlightApp.Web.RadUploadHandler 

Everything  works perfect for me under IIS 6 with the UploadServiceUrl defined as discussed above.

0
Rich Gouette
Top achievements
Rank 1
answered on 18 Dec 2009, 09:09 PM
ok, Frank lemme check that out.
thanks much.
R

0
Rich Gouette
Top achievements
Rank 1
answered on 28 Dec 2009, 03:36 PM
Hodwy Frank, just striking out on namespaces/class names etc
Can't seem to get rid of the Handler Not Found message.  :(

Tried handler .ashx  as:
<%@ WebHandler Language="VB" CodeBehind="RadUploadHandler.ashx.vb" Class="RadUploadHandler" %>


and code behind as:
Imports System
Imports System.Web

Namespace SilverlightApp.Web
    Public Class RadUploadHandler
        Inherits Telerik.Windows.RadUploadHandler
    End Class
End Namespace



Any further thoughts?
Rich



0
Frank
Top achievements
Rank 1
answered on 28 Dec 2009, 04:17 PM

Hi Rich,

I still suspect that there is a problem with the namespace.

Here is what I have in my test project which is running fine.

Handler .ashx page

1. <%@ WebHandler Language="VB" CodeBehind="RadUploadHandler.ashx.vb" Class="MyUploadHandler.Web.RadUploadHandler" %>

MyUploadHandler.Web is the web project and also the root namespace which is defined in project properties.

2. Handler Class

Imports System.Web

Public Class RadUploadHandler
        Inherits Telerik.Windows.RadUploadHandler

End Class

3. RadUpload  control Definition in XAML page

<TelerikInput:RadUpload x:Name="RadUpload_Documents"           
     MaxHeight="9999"
     MaxWidth="999"       
     IsAppendFilesEnabled="True"   
     IsAutomaticUpload="True"         
     UploadServiceUrl="~/MyUploadHandler/RadUploadHandler.ashx"  
     TargetFolder="attachments"
     MaxFileCount="99"
     Filter="Image Files(*.gif;*.jpg;*.jpeg;*.png)|*.bmp;*.jpg;*.jpeg;*.png;"
     OverwriteExistingFiles="True"  />
  
I  have the virtual directory MyUploadHandler set up in IIS.

I can forward you  my sample project if you want.

0
Rich Gouette
Top achievements
Rank 1
answered on 28 Dec 2009, 06:50 PM
boy, I'm not sure what's up on my end.
Some kinda ORC mischief no doubt..

Still getting the same @#$% error message.
Though, I'm starting to think that it's really just user cluelessness...
Not some technical error..
If you have the project handy, maybe that would help..

Many thanks for hanging in there through this.
Rich

0
Rich Gouette
Top achievements
Rank 1
answered on 29 Dec 2009, 08:45 PM
Ended up having to restore my solution from a recent backup due to ...well, stuff.

SO, I'm starting from scratch with the uploader control(not a bad idea actually)
I'll outline exactly what I've done:
1) Add reference to the Telerik.Windows.RadUploadHandler
2) Added a handler and named it: RadUploadHandler.ashx
3) matched my XAML appropriately for URI path...
my virtual directory on IIS is  "aemrRequest" , so XAML reads:

                             <telerikInput:RadUpload x:Name="radUpload" 
                                                        Margin="78,0,92,42" 
                                                        VerticalAlignment="Bottom" 
                                                        MaxHeight="9999" 
                                                        MaxWidth="999"        
                                                        IsAppendFilesEnabled="True"    
                                                        IsAutomaticUpload="True"          
                                                        UploadServiceUrl="~/aemrRequest/RadUploadHandler.ashx"   
                                                        TargetFolder="attachments" 
                                                        MaxFileCount="99" 
                                                        Filter="Image Files(*.gif;*.jpg;*.jpeg;*.png)|*.bmp;*.jpg;*.jpeg;*.png;" 
                                                        OverwriteExistingFiles="True" 
                                                        /> 

Handler code behind reads:
Imports System 
Imports System.Web 
 
'Namespace SilverlightApp.Web 
Public Class RadUploadHandler 
    Inherits Telerik.Windows.RadUploadHandler 
End Class 
'End Namespace 

Still get that persistent "Handler Not found" message.
Any other ideas that I can look at to narrow it down?
I'm finishing for the day, but will tackle this again probably tomorrow.
I'll also look again at your example solution you sent me.

Thanks,
Rich




0
Ivan
Telerik team
answered on 04 Jan 2010, 10:22 AM
Hello Rich,

Thank you for your interest in our controls.

Could you please check all the points in the Troubleshooting RadUpload for Silverlight article. I'm especially interesting in the result of:
  • accessing the upload handler via a web-browser;
  • accessing the upload handler from your Silverlight application using the fill path.

Looking forward for your reply.

All the best,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rich Gouette
Top achievements
Rank 1
answered on 04 Jan 2010, 02:11 PM

Hi Ivan.

Part of my problem is that I cannot run my solution locally, due to SSL/service configuration.
My SL service reference reads:
https://<myPath>/_vti_bin/Lists.asmx
So, since I cannot do SSL on my workstation, I'm forced to test this solution "live" on the web server.
Therefore, the troubleshooting steps that require me to do things within the context of http://localhost won't apply.

If that prevents us from continuing further, I'll understand.

If I try to open "RadUploadHandler.ashx" with internet explorer, it tells me:
(C:\Documents and Settings\gouetr\My Documents\Visual Studio 2008\Projects\AEMRrequestForm\AEMRrequestForm.Web\RadUploadHandler.ashx)

<>The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


A name was started with an invalid character. Error processing resource 'file:///C:/Documents and Settings/gouetr/My Docume...

<%@ WebHandler Language="VB" CodeBehind="RadUploadHandler.ashx.vb" Class="AEMRrequestForm.Web.RadUploadHandler" %> -^

 


If I try to open it via the working URL for the website, it tells me:
(https://richdev.webdev2003.mmc.org/AEMRRequest/RadUploadHandler.ashx)
 

Server Error in '/AEMRRequest' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>



Well, thanks again for hanging in there with me.
Rich

 

0
Ivan
Telerik team
answered on 07 Jan 2010, 04:28 PM
Hi Rich,

There are no known issues with the secured IIS and RadUpload control. You can tune your local IIS up as it is described in the RadUpload and https article. Please give it a try and let us know if you need further assistance.

Sincerely yours,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Upload
Asked by
Rich Gouette
Top achievements
Rank 1
Answers by
jtby
Top achievements
Rank 1
Rich Gouette
Top achievements
Rank 1
Frank
Top achievements
Rank 1
Ivan
Telerik team
Share this question
or