[Mono-bugs] [Bug 500739] New: Error when accessing anything but default route using system.web.routing
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon May 4 15:47:47 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=500739
Summary: Error when accessing anything but default route using
system.web.routing
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: x86
OS/Version: Ubuntu
Status: NEW
Severity: Major
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: derek at spathi.com
QAContact: mono-bugs at lists.ximian.com
Found By: Development
Description of Problem:
I am having trouble getting routing to work on mono. The default route works
fine but nothing else does.
Steps to reproduce the problem:
1. Create some routes:
routes.MapRoute(
"HelloRoute",
"Hello/{name}",
new { controller = "Home", action = "Hello" }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = "" }
);
2. and corresponding actions
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 ();
}
3. navigate to http://localhost/ I get the message Welcome to...
4 navigate to http://localhost/Hello/World you will get an error:
value name controller does not match any of the values.
Description: HTTP 500. Error processing request.
Stack Trace:
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]
The exact same code runs fine on Microsofts .net stack.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list