Asp.net 使用kentico门户模板的自定义路由

Asp.net 使用kentico门户模板的自定义路由,asp.net,kentico,Asp.net,Kentico,Asp.net允许我们注册新的自定义路由 这样称呼他们: 此方法适用于Kentico,但仅适用于.aspx页面(例如~/CMSPages/Default.aspx中的页面)。 我的问题是,如何为使用门户模板方法创建的页面获得相同的结果? 我正在尝试制作自己的HttpHandler public class CustomHandlerProduct : IHttpHandler { public CustomHandlerProduct() { //

Asp.net允许我们注册新的自定义路由

这样称呼他们:

此方法适用于Kentico,但仅适用于.aspx页面(例如~/CMSPages/Default.aspx中的页面)。 我的问题是,如何为使用门户模板方法创建的页面获得相同的结果? 我正在尝试制作自己的HttpHandler

public class CustomHandlerProduct : IHttpHandler
{
    public CustomHandlerProduct()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public bool IsReusable
    {
        // To enable pooling, return true here.
        // This keeps the handler in memory.
        get { return false; }
    }

    public void ProcessRequest(HttpContext context)
    {
    }
}
根据本文,甚至是HttpModule

但我不能达到预期的效果


有什么想法吗?

如果您想使用Portal engine,有没有理由不使用Kentico URL重写功能?通配符URL的工作原理与路由非常相似。请参阅文档

我尝试使用通配符URL,但此解决方案不适用于我。你还有其他的建议吗?它能与.aspx扩展名一起工作吗?如果是,则可能只是无扩展配置,请参阅。你尝试通配符时是否删除了自定义路由?是的,问题出在我的自定义路由中。蒂米夫拉
public class CustomHandlerProduct : IHttpHandler
{
    public CustomHandlerProduct()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public bool IsReusable
    {
        // To enable pooling, return true here.
        // This keeps the handler in memory.
        get { return false; }
    }

    public void ProcessRequest(HttpContext context)
    {
    }
}