KB's

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) 
    { 
 
    }