Sitefinity ASP.NET CMS
Skip Navigation LinksSupport / Knowledge Base / Detail mode of declaratively added controls throws Error 404

Detail mode of declaratively added controls throws Error 404

The problem can be reproduced in 3.x versions when you use declaratively added ContentView based controls as NewsView, EventsView, ContentView, BlogPosts. The problem can be reproduced when you register the control in a template and try to navigate to the full content of an item.

 

Control/Page template

<%@ Register TagPrefix="sf" Namespace="Telerik.News.WebControls"  Assembly="Telerik.News" %> 
<sf:NewsView runat="server" ID="NewsView1" BehaviorMode="Auto" ProviderName="News"></sf:NewsView> 

 

The problem lies in the UrlRewriterService that we use. Actually, all links are correct and it is hard to figure out what is going wrong. After some debugging, we managed to come up with a simple solution that requires to register Telerik.Web.UrlRewriterService in the code behind of your user control

 

Code Behind

[Telerik.Web.UrlRewriterService("Telerik.Cms.Engine.ContentUrlRewriterService, Telerik.Cms.Engine")] 
public partial class TelerikSamples_SamppleControl: System.Web.UI.UserControl 
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 

Article Info

Article relates to 3.x
Created by Ivan Dimitrov
Last modified by
Related categories: Workarounds , Problems/errors

About Telerik

Telerik, the publisher of Sitefinity CMS, is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting and .NET ORMTFSCode Analysis and Web Application Testing tools. Building on its solid expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Created with passion, Telerik products help thousands of developers every day to be more productive and deliver reliable applications under budget and on time. Read more about Telerik

Copyright © 2002-2010 Telerik. All rights reserved. Powered by Sitefinity