I have a fresh install of umbraco 4.11.3 I'm trying to do a simple controller test with , but something went awry for me. I created a Document Type "Demo" with no matching template. Then a content item called "Demo" based on that Document type and change this config setting (defaultRenderingEngine --> MVC) I added a new controller with the code below.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Umbraco.Web.Models;
namespace FrontEnd.Controllers
{
public class DemoController : Umbraco.Web.Mvc.RenderMvcController
{
//
// GET: /Demo/
public ActionResult Index(RenderModel model)
{
return base.Index(model);
}
public ActionResult Demo(RenderModel model)
{
return View(model);
}
}
}
I get this error:
The current request for action 'Index' on controller type 'DemoController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Index(Umbraco.Web.Models.RenderModel) on type FrontEnd.Controllers.DemoController
System.Web.Mvc.ActionResult Index(Umbraco.Web.Models.RenderModel) on type Umbraco.Web.Mvc.RenderMvcController
Exception Details: System.Reflection.AmbiguousMatchException: The current request for action 'Index' on controller type 'DemoController'
is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Index(Umbraco.Web.Models.RenderModel) on type FrontEnd.Controllers.DemoController
System.Web.Mvc.ActionResult Index(Umbraco.Web.Models.RenderModel) on type Umbraco.Web.Mvc.RenderMvcController
Any ideas on where to do for here?
Thanks
Forgot to supply the override,
public override ActionResult Index(RenderModel model)
{
return base.Index(model);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With