.NET 4.5 MVC RouteCollection.LowercaseUrls breaks when using Area

前端 未结 1 390
梦毁少年i
梦毁少年i 2021-01-01 16:41

A new property to RouteCollection was added with .NET Framework 4.5:

http://msdn.microsoft.com/en-us/library/system.web.routing.routecollection.lowercaseurls.aspx

1条回答
  •  既然无缘
    2021-01-01 17:23

    This indeed appears to be a bug in the interaction between ASP.NET MVC and ASP.NET 4.5's new LowercaseUrls feature in routing.

    I have logged a bug for MVC here: http://aspnetwebstack.codeplex.com/workitem/685

    Thank you for reporting this!

    As Cristi Pufu mentions, it appears that others have written some NuGet packages to handle similar scenarios:

    • http://nuget.org/packages/LowercaseRoutesMVC - adds support for lowercase URLs
    • http://nuget.org/packages/AttributeRouting - adds super fancy support for tons of neat feature, including lowercase URLs (see https://github.com/mccalltd/AttributeRouting/wiki/Generating-Lowercase-Outbound-URLs)

    EDIT 4/23/2013 - We have recently accepted a pull request with a fix for this issue for ASP.NET MVC 5.

    0 讨论(0)
提交回复
热议问题