Bug 25902 - Error:500 - System.MissingMethodException when running ASP .NET with Razor project.
Summary: Error:500 - System.MissingMethodException when running ASP .NET with Razor pr...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: 3.10.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-10 18:21 UTC by WENDY SANARWANTO
Modified: 2015-03-20 09:47 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Error 500 - System.MissingMethodException Method not found: 'System.Web.Routing.RouteCollection.get_AppendTrailingSlash'. (304.34 KB, image/png)
2015-01-10 18:21 UTC, WENDY SANARWANTO
Details

Description WENDY SANARWANTO 2015-01-10 18:21:05 UTC
Created attachment 9313 [details]
Error 500 - System.MissingMethodException Method not found: 'System.Web.Routing.RouteCollection.get_AppendTrailingSlash'.

Synopsis:
=========
When running an ASP .NET MVC Razor Project in Xamarin studio, the web application throws Error:500 "System.MissingMethodException
Method not found: 'System.Web.Routing.RouteCollection.get_AppendTrailingSlash'."

Steps to replicate the issue:
=============================
1. Create a new ASP .NET MVC Razor Project in Xamarin Studio.
2. Add a new Home controller with Index action where the Index action return ViewResult.
3. Add a Home folder in the Views folder.
4. Add a new razor cshtml page inside the created Home folder in step #3 and name it as Index.cshtml.
5. Add a new action on the Home controller. Make notes on the new action name (e.g. DoSomething).
6. Add an Action Link on the Index.cshtml page where the action's name as in Step #5 (e.g. @Html.ActionLink("Do Something", "DoSomething").
7. Build & run the web application. Confirm that error:500 - "System.MissingMethodException
Method not found: 'System.Web.Routing.RouteCollection.get_AppendTrailingSlash'." occurs.

System's Environment:
=====================
- PC runs on Mac OS X Mavericks 10.9.5
- Xamarin Studio version 5.5.4 (Build 15)
- Mono 3.10.0
Comment 1 Arsen.Shnurkov 2015-03-20 09:47:22 UTC
Duplicate of 
https://bugzilla.xamarin.com/show_bug.cgi?id=16475

There is no such function in source code:
https://github.com/mono/mono/blob/master/mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs 

Seevral patches
https://github.com/mono/mono/pull/862
https://github.com/mono/mono/pull/874
was rejected by Miguel de Icaza with the explaination
"this patch ... adds the properties, but they are not actually used anywhere"

one patch was not merged:
https://github.com/mono/mono/pull/888

https://github.com/mono/mono/pull/888#issuecomment-70732895
As of 1/20/2015, there are still some missing methods in System.Web.Routing.RouteCollection:
public bool AppendTrailingSlash { get; set; }
public bool LowercaseUrls { get; set; }
as well as System.Web.HttpApplication.RegisterModule().

Note You need to log in before you can comment on or make changes to this bug.