[Mono-bugs] [Bug 609659] New: ASP.Net MVC 2: HtmlHelper generic methods fail
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu May 27 18:13:36 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=609659
http://bugzilla.novell.com/show_bug.cgi?id=609659#c0
Summary: ASP.Net MVC 2: HtmlHelper generic methods fail
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: Other
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: oskar.berggren at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9)
Gecko/20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9
Attached is a testcase with ASP.Net MVC 2 that works on .Net but fails on Mono
2.6.4.
This appears to prevent usage of the generic extensions methods for HtmlHelper,
new in asp.net mvc2, like TextBoxFor(), etc.
Server Error in '/' Application
The property Mvc2TextBoxFor.Models.TestModel.Name could not be found.
Description: HTTP 500. Error processing request.
Stack Trace:
System.ArgumentException: The property Mvc2TextBoxFor.Models.TestModel.Name
could not be found.
at System.Web.Mvc.AssociatedMetadataProvider.GetMetadataForProperty
(System.Func`1 modelAccessor, System.Type containerType, System.String
propertyName) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ModelMetadata.GetMetadataFromProvider (System.Func`1
modelAccessor, System.Type modelType, System.String propertyName, System.Type
containerType) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ModelMetadata.FromLambdaExpression[TestModel,String]
(System.Linq.Expressions.Expression`1 expression,
System.Web.Mvc.ViewDataDictionary`1 viewData) [0x00000] in <filename unknown>:0
at System.Web.Mvc.Html.LabelExtensions.LabelFor[TestModel,String]
(System.Web.Mvc.HtmlHelper`1 html, System.Linq.Expressions.Expression`1
expression) [0x00000] in <filename unknown>:0
at ASP.views_home_index_aspx.__RenderTree (System.Web.UI.HtmlTextWriter
__output, System.Web.UI.Control parameterContainer) [0x00000] in <filename
unknown>:0
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer)
[0x00000] in <filename unknown>:0
at System.Web.UI.Control.Render (System.Web.UI.HtmlTextWriter writer)
[0x00000] in <filename unknown>:0
at System.Web.UI.Page.Render (System.Web.UI.HtmlTextWriter writer) [0x00000]
in <filename unknown>:0
at System.Web.Mvc.ViewPage.Render (System.Web.UI.HtmlTextWriter writer)
[0x00000] in <filename unknown>:0
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer)
[0x00000] in <filename unknown>:0
at System.Web.UI.Page.RenderPage () [0x00000] in <filename unknown>:0
at System.Web.UI.Page.InternalProcessRequest () [0x00000] in <filename
unknown>:0
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x00000] in <filename unknown>:0
Note that if a try to use a property that really doesn't exist, I get a
compilation error as expected. This seems to be something related to reflection
or Expression.
Reproducible: Always
--
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