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
gouetr@mmc.org
Rich
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.
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"
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.
thanks much.
R
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
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.
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
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
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.
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".
|
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.
|
Well, thanks again for hanging in there with me.
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.