Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have problem with my custom routing in Umbraco 13. I have a Umbraco 7 site running where my custom routes is defined like so:
routes.MapUmbracoRoute( "ProductProductType", "produkter/{producttype}", new { controller = "Product", action = "ProductType", page = ProductType.Course }, new UmbracoVirtualNodeByIdRouteHandler(1360) );
I've tried setting it up multible ways in Umbraco 13. Both with Custom middleware and by following: https://docs.umbraco.com/umbraco-cms/reference/routing/custom-routes
But in every scenario i end up getting this error: No UmbracoRouteValues feature was found in the HttpContext
This is Controller from Umbraco 7:
public ActionResult ProductType(ProductTypeModel model, string producttype, ProductType page) { try { mTimer.Start(); model.ProductType = producttype == null ? string.Empty : producttype.ToLower(); model.Page = page; model.ProductUrl = this.Request.Url.ToString(); var preparedModel = mProductControllerService.PrepareProductTypeModel(model); if (preparedModel.Success) { if (!string.IsNullOrWhiteSpace(model.RedirectToUrl)) return new RedirectResult(model.RedirectToUrl, true); return View("Productpage", preparedModel.Value); } mSharedHelperService.RedirectToErrorPage(preparedModel); return null; } finally { mTimer.Stop(); //Debug.WriteLine($"ProductController ProductType ({mTimer.ElapsedMilliseconds} milliseconds))"); } }
I hope my problem makes sense.
Thanks!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom endpoint/route handling
I have problem with my custom routing in Umbraco 13. I have a Umbraco 7 site running where my custom routes is defined like so:
I've tried setting it up multible ways in Umbraco 13. Both with Custom middleware and by following: https://docs.umbraco.com/umbraco-cms/reference/routing/custom-routes
But in every scenario i end up getting this error: No UmbracoRouteValues feature was found in the HttpContext
This is Controller from Umbraco 7:
I hope my problem makes sense.
Thanks!
is working on a reply...