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
This works great, until you add an Area to your project. All Urls are propercase again.
Any ideas why this happens? It's simple to reproduce:
It breaks at the point where context.MapRoute gets executed in AreaRegistration.RegisterArea. When I comment that out, I got lowercase Urls. Uncomment it, and the propercase Urls are back.
It seems to me like Microsoft knows this is buggy and doesn't advertise this new feature, as it's a really great feature but it is only mentioned in the MSDN docs.
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:
EDIT 4/23/2013 - We have recently accepted a pull request with a fix for this issue for ASP.NET MVC 5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With