Ajax Callback Error
|
Article relates to
|
RadUpload "Prometheus"
|
|
Created by
|
Sophy, Telerik
|
|
Last modified by
|
Veskoni, Telerik
|
Ajax Callback Error
Most often reasons for receiving the error
- Missing or incorrect registration of the RadUploadHttpModule and RadUploadProgressHandler in the Web.config file
- There are other conflicting handlers or modules registered in the Web.config file
- URL Rewriter rules
- Trust Level
- Web server is configured to check for existence of the requested files
- Running your application in Integrated IIS7 mode
- Using Forms Authentication
- Using RadUpload in DNN
Resolutions
- Register RadUploadHttpModule and RadUploadProgressHandler in the Web.config file if they are not registered or check whether they are registered correctly if they are already registered in the Web.config file.
STRONGLY RECOMMENDED
Check whether the RadUploadProgressHandler’s registration is correct. You can do this if you access directly the handler’s url from the browser in the following way:
http://mysite/Telerik.RadUploadProgressHandler.ashx
where mysite is your site’s url
If everything is registered correctly, you should see the following line:
var rawProgressData = {InProgress:false,RadProgressContextCustomCounters:false};
- Check for other conflicting modules and handers in the web.config and the order in which they are registered
Example:
If you register a handler which is more common and handles the requests which should actually be handled by handlers registered below, the Ajax Callback Error will be reproduced, e. g.:
<add verb="*" path="*.ashx" type="sfHttpHandler.HttpXmlHandler, sfHttpHandler"/>
<add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI"/>
The first handler is actually registered for every .ashx file because of the path="*.ashx". RadUploadProgressHandler is also an ashx -Telerik.RadUploadProgressHandler.ashx and thus the request for Telerik.RadUploadProgressHandler.ashx will be handled by the wrong handler -sfHttpHandler.HttpXmlHandler. The order in which the handlers in Web.config are registered is extremely important. If you change the order of the above handlers Telerik.RadUploadProgressHandler.ashx will be handled by the correct handler - RadUploadProgressHandler.
- Check for URLRewriter rules which may redirects the call to Telerik.RadUploadProgressHandler.ashx to somewhere else.
- RadMemoryOptimization requires ReflectionPermission in order to operate correctly. To achieve this you can choose one of the following options:
- Run your application with Full Trust permission set. To achieve this put the following in your web.config:
...
<system.web>
...
<trust level="Full" />
...
</system.web>
- Create custom security policy which allows ReflectionPermission.
- Run your application in Medium trust and put RadUpload’s assembly in the GAC.
More information about the trust levels can be found here .
- When RadProgressManager tries to access Telerik.RadUploadProgressHandler.ashx, the server searches for a physical file, but it is not existing, because it is only registered in the Web.config. To resolve the problem you should make sure that the web server isn't checking for the existence of the requested files:
- Currently RadUpload works in IIS7 Classic mode and Cassini, however, it does not support Intergrated IIS7 mode. To run RadUpload in IIS7 you should make sure that the ApplicationPool setting of your application is set to Classic .NET AppPool. To do this you should right click on you application in IIS7 choose Advanced Settings and set the ApplicationTool option to Classic .NET AppPool.
- Refer to the Using Forms Authentication section in this help article and follow the instructions listed there.
- Before all rewriter rules in the Rules section in the SiteUrls.config
should be added the following rewriter rule:
<RewriterRule>
<LookFor>.*Telerik.RadUploadProgressHandler.ashx(.*)</LookFor>
<SendTo>~/Telerik.RadUploadProgressHandler.ashx$1</SendTo>
</RewriterRule>
Comments
If you'd like to comment on this KB
article, please, send us a
Support Ticket.
Thank you!
Please
Sign In
to rate this article.