Issue with AuthorizeAttributeAclModule and .aspx routes

Oct 27, 2010 at 6:17 PM

I had been using a route structure with .aspx in it (as a holdover from when we were using IIS6), and I discovered that the AuthorizeAttributeAclModule will cause the SiteMapPath to incorrectly identify the current node.  AuthorizeAttributeAclModule has a few RewritePath calls in it which, when given a path that looks like Foo.aspx/Bar ({controller}.aspx/{action}), clears the PathInfo property of HttpContext.Request (which normally contains everything after the .aspx, in this case "/Bar").  This changes how GetRouteData loads the route data, and will in effect always use the default action.

You can reproduce this by creating a sitemap with a node in it that uses an action other than the default and in Global.asax.cs changing the default route from {controller}/{action}/{id} to {controller}.aspx/{action}/{id}.  If you then put a SiteMapPath on your page, it no longer recognizes the correct current node when you're on a page in the site map that uses a non-default action.

Coordinator
Oct 28, 2010 at 5:50 AM

Have you tested this with the very latest 2.2.0 release?

Oct 28, 2010 at 12:49 PM

Yes, I had the same issue with 2.2.

Coordinator
Oct 28, 2010 at 1:36 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.