2013-01-16 20 views
5

मेरे पास umbraco 4.11.3 का एक नया इंस्टॉल है, मैं एक सरल नियंत्रक परीक्षण करने की कोशिश कर रहा हूं, लेकिन मेरे लिए कुछ ख़राब हो गया। मैंने कोई मिलान प्रकार टेम्पलेट के साथ एक दस्तावेज़ प्रकार "डेमो" बनाया है। फिर उस दस्तावेज़ प्रकार के आधार पर "डेमो" नामक सामग्री सामग्री और इस कॉन्फ़िगरेशन सेटिंग को बदलें (डिफ़ॉल्ट रेंडरिंगइंजिन -> एमवीसी) मैंने नीचे दिए गए कोड के साथ एक नया नियंत्रक जोड़ा।उम्ब्राको 4.11.3 - नियंत्रक प्रकार पर वर्तमान अनुरोध संदिग्ध है

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 

जहां यहाँ के लिए क्या करने पर कोई भी विचार:

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

मैं इस त्रुटि मिलती है? मेरा बुरा -

धन्यवाद

+0

उफ़ भूल। इंडेक्स एक्शन विधि को ओवरराइड करना भूल गया। अब काम करता है – MikeW

+1

अपने स्वयं के प्रश्न का उत्तर देने पर विचार करें और फिर इसे उत्तर के रूप में चिह्नित करें। –

उत्तर

8

, ओवरराइड की आपूर्ति करने

public override ActionResult Index(RenderModel model) 
    { 
     return base.Index(model); 
    } 

 संबंधित मुद्दे

  • कोई संबंधित समस्या नहीं^_^