The current request for action 'Index' on controller type 'MyExampleController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Index(Umbraco.Web.Models.RenderModel) on type Terabyte.UmbracoWebsite.Controllers.Hijacking.MyExampleController System.Web.Mvc.ActionResult Index(Umbraco.Web.Models.RenderModel) on type Umbraco.Web.Mvc.RenderMvcController
hi Jeroen - thanks, I used from the hybrid project to achieve what I needed. It doesn't look like you can pass control back to the default route action handler like you could in umb 6 but that's ok.
route hijacking in umb7
hello
has anyone got route hijacking working successfully in umbraco 7 as per http://umbraco.com/follow-us/blog-archive/2014/1/27/a-practical-example-of-route-hijacking-in-umbraco ?
I get an exception
The current request for action 'Index' on controller type 'MyExampleController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Index(Umbraco.Web.Models.RenderModel) on type Terabyte.UmbracoWebsite.Controllers.Hijacking.MyExampleController
System.Web.Mvc.ActionResult Index(Umbraco.Web.Models.RenderModel) on type Umbraco.Web.Mvc.RenderMvcController
my code worked in umbraco 6.
thanks
Hi Andrew
What exact version of Umbraco 7 are you currently using? Something might have changed since the post was written last year. Before 7.1 was released.
Don't know if Shannons writing here helps any http://shazwazza.com/post/custom-mvc-routes-within-the-umbraco-pipeline/?
/Jan
Hi Andrew,
Perhaps this post from StackOverflow can explain why you are getting this message. Try to see here: http://stackoverflow.com/questions/10668105/routing-the-current-request-for-action-is-ambiguous-between-the-following
Hope this helps too,
/Dennis
Hello,
I've got it working in the Hybrid Framework. I hope that helps.
Jeroen
hi Jan,
I'm using version 7.2.1
I read that link but my scenario is hijacking an existing umbraco controller route, not a custom route, so slightly different.
thanks!
Hi Andrew, I had a similar situation and got a similar exception while hijacking 'existing/default' route. I added a route for default path and received the error. However I got suggestions to use IContentProvider/IURLProvider to hijack existing route. Hope this will be helpful: http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/60621-How-to-change-default-route-in-Umbraco7
hi Jeroen - thanks, I used from the hybrid project to achieve what I needed. It doesn't look like you can pass control back to the default route action handler like you could in umb 6 but that's ok.
Glad the Hybrid Framework helped. Could you please mark a post as the answer if the problem is fixed.
Jeroen
is working on a reply...