Note that there are some explanatory texts on larger screens.

plurals
  1. POError when accessing anything but default route
    primarykey
    data
    text
    <p>I am having trouble getting routing to work on mono. The default route works fine but nothing else does.</p> <p>These are the routes I have setup:</p> <pre><code> routes.MapRoute( "HelloRoute", "Hello/{name}", new { controller = "Home", action = "Hello" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); </code></pre> <p>and on my HomeController I have the corresponding action:</p> <pre><code> public ActionResult Index () { ViewData["Message"] = "Welcome to ASP.NET MVC on Mono!"; return View (); } public ActionResult Hello(string name) { ViewData["Message"] = "hello "+name; return View (); } </code></pre> <p>now if I navigate to <a href="http://localhost/" rel="nofollow noreferrer">http://localhost/</a> I get the message Welcome to... but if I go to <a href="http://localhost/Hello/World" rel="nofollow noreferrer">http://localhost/Hello/World</a> I get an error:</p> <pre><code>value name controller does not match any of the values. </code></pre> <p>Description: HTTP 500. Error processing request.</p> <p>Stack Trace:</p> <p>System.InvalidOperationException: value name controller does not match any of the values. at System.Web.Routing.RouteData.GetRequiredString (System.String valueName) [0x00000] at System.Web.Mvc.MvcHandler.ProcessRequest (System.Web.HttpContextBase httpContext) [0x00000] at System.Web.Mvc.MvcHandler.ProcessRequest (System.Web.HttpContext httpContext) [0x00000] at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest (System.Web.HttpContext httpContext) [0x00000] at System.Web.HttpApplication+c__Iterator2.MoveNext () [0x00000] at System.Web.HttpApplication.Tick () [0x00000] </p> <p>am I doing something obviously wrong?</p> <p>Apart from the aditional route, action and view this is a standard asp.net mvc project created in Monodevelop.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload