[Mono-bugs] [Bug 537751] New: System.Web.Routing: it should not try to parse null or empty string
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Sep 9 10:24:02 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=537751
Summary: System.Web.Routing: it should not try to parse null or
empty string
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: 32bit
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: olson.jeffery at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Community User
Description of Problem:
ASP.NET error/stack trace from XSP:
INTERNAL ERROR: it should not try to parse null or empty string
Description: HTTP 500. Error processing request.
Stack Trace:
System.SystemException: INTERNAL ERROR: it should not try to parse null or
empty string
at System.Web.Routing.PatternParser.Parse () [0x00000]
at System.Web.Routing.PatternParser..ctor (System.String pattern) [0x00000]
at System.Web.Routing.Route.set_Url (System.String value) [0x00000]
at System.Web.Routing.Route..ctor (System.String url,
System.Web.Routing.RouteValueDictionary defaults,
System.Web.Routing.RouteValueDictionary constraints,
System.Web.Routing.RouteValueDictionary dataTokens, IRouteHandler routeHandler)
[0x00000]
at System.Web.Routing.Route..ctor (System.String url,
System.Web.Routing.RouteValueDictionary defaults,
System.Web.Routing.RouteValueDictionary constraints, IRouteHandler
routeHandler) [0x00000]
at System.Web.Routing.Route..ctor (System.String url,
System.Web.Routing.RouteValueDictionary defaults, IRouteHandler routeHandler)
[0x00000]
at System.Web.Routing.Route..ctor (System.String url, IRouteHandler
routeHandler) [0x00000]
at Mercury.Core.MercuryRoute..ctor (System.String url,
Mercury.Core.MercuryRouteHandler routeHandler, System.String method) [0x00000]
at Mercury.Core.MercuryStartupService.BuildRoutes () [0x00000]
at Mercury.ExampleSite.MercuryApplication.ConfigureMercuryEngine () [0x00000]
at Mercury.ExampleSite.MercuryApplication.Application_Start () [0x00000]
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
Version information: Mono Version: 2.0.50727.1433; ASP.NET Version:
2.0.50727.1433
Steps to reproduce the problem:
1. During Application_Start(), attempt to create a System.Web.Routing.Route
which has an empty string for its Url component
Actual Results:
Throws a System.Exception with an 'it should not try to parse null or empty
string' message.
Expected Results:
The MS.NET version of System.Web.Routing.Route allows the creation of a route
with an empty string for its URL.
How often does this happen?
Every time.
Additional Information:
I am using Mono 2.4.2.3 built from the release source on Ubuntu 9.04.
In the MS.NET implementation of System.Web.Routing, having a route with an
empty string is allowed. It is a valid way to have a route that matches to the
root of a site (e.g. "http://www.example.com" or what would be the Default.aspx
document at the root of the application). It's *very* necessary if you're going
to have a heavily routing-based web application that doesn't make use of the
ASP.NET MVC controller/view "convention-based" Routing mappings, especially if
you want to avoid having a "Dummy" Default.aspx document to match requests to
the root of a site.
I don't know what lead to this constraint being created in Mono's impl of
System.Web.Routing, but it is inconsistent with the behavior of the MS impl. Is
this in line with an ECMA spec on Route's behavior? If so (and Microsoft's impl
has strayed from the implementation), I would like to see some published
guidance on how to create a Route that would match a request to the root of a
web application, as was done previously with a Route that had an empty string
for its Url component and be portable between Mono and MS.NET.
Thanks
--
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