maartenba/MvcSiteMapProvider — pull request #132 by NightOwl888 (2013-02-22 18:14:57+00:00)
Title: MvcSiteMapProvider does not respect AllowAnonymous with SecurityTrimmingEnabled in MVC4

Fixes #130.

IMPORTANT: I had to change the compiler constant methodology from "NET35", "NET40", etc. to "MVC2", "MVC3", "MVC4" because the new attribute is included in MVC 4, not the .NET BCL. I reviewed the other compiler constant logic, but wasn't sure about the decisions being made in the MvcSiteMapProviderViewEngine, so please review it again.

The default version of MVC when no compiler constant is used is now MVC4.

Also added the AllowAnonymous attribute to XmlSiteMapController so it can be used in sites that have global AuthorizeAttribute filters defined.

References for fix that was implemented:
http://blogs.msdn.com/b/rickandy/archive/2011/05/02/securing-your-asp-net-mvc-3-application.aspx
http://blogs.msdn.com/b/rickandy/archive/2012/03/23/securing-your-asp-net-mvc-4-app-and-the-new-allowanonymous-attribute.aspx