Error: Web.config registration missing! The Telerik dialogs require a HttpHandler registration in the web.config file.
|
Article relates to
|
Telerik.Web.UI 2007.3 1425+
|
|
Created by
|
Rumen Zhekov
|
|
Last modified
|
2009/04/10
|
|
Last modified by
|
Rumen Zhekov
|
PROBLEM
Error: Web.config registration missing! The Telerik dialogs require a HttpHandler registration in the web.config file.
DESCRIPTION
Such error can appear:
- Problem 1: If the dialog hanlder of the editor's dialogs is not registed in the web config.
- Problem 2: In CMS scenarios, when some URL rewirter module overwrites the URLs of the editor's dialogs even if the dialog hanlder of the dialog is registered properly in the web.cofig file.
- Problem 3: The site is running in a IIS 7 environment in Integrated Mode and the handlers have not been added to the <system.webServer> section.
- Problem 4: Another HTTP handler is intercepting the dialogs request.
SOLUTION
- Problem 1: The dialog hanlder can be easily added automatically to the web.config file through the control's Smart Tag. You can see the help for more information: Controls > Editor > Dialogssee the help for more information: Controls > Editor > Dialogs.
- Problem 2: To fix the URL rewirter problem exclude the editor dialogs from the URL rewriting routine. To do this, simply add the Telerik.Web.UI.DialogHandler.aspx file to the if () statement that checks the request URL:
| if ((currentURL.Contains("/cms/")) && (currentURL.EndsWith(".aspx")) && |
| !currentURL.EndsWith("Telerik.Web.UI.DialogHandler.aspx")) |
| ... |
This way the request for the dialog aspx will not be handled by your module and the dialog will load OK.
Note: ISAPI Fiter such as MS URLScan (urlscan.dll) could mess up the url calls and cause this error too.
-
Problem 3: When a web site is running under IIS7 Integrated mode, the web server searches the HttpHandler registrations under the <system.webServer> configuration section instead of the standard <system.web> configuration section of the application configuration file.
All you need to do to manually register the HttpHandler for the IIS7 Integrated mode is copy the Telerik HttpHandler to the <handlers> section of the <system.webServer> section group, delete the validate attribute and give it a name, e.g.
- Problem 4: The order of the entries in the <httpHandlers> section matters. The section is parsed from top to bottom. Also, if you have multiple web.config files, the handlers in the one in the root application folder will be used before the handlers in the web.config of a child folder. When a matching handler is found, the search stops and the handlers below it will never be executed. For example, if you have the following entries in your web.config:
When you make a request for an editor dialog, the first handler (*.aspx) will always match it, because it matches all aspx files. This means that our handler, which is bellow, will never be executed. In this case, changing the positions of the two handlers will fix the problem. As a general rule, keep more specific handlers at the top of the list and more general handlers at the bottom.
Please, note that the solutions above will not work for MOSS 2007 and MVC applications. To fix the problem:
- open the web.config file and replace Telerik.Web.UI.DialogHandler.aspx with Telerik.Web.UI.DialogHandler.axd
- set the RadEditor's DialogHandlerUrl property to "~/Telerik.Web.UI.DialogHandler.axd"
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.