I am currently writing an Authorisation filter in MVC4, it has the default URL rewrite
routes.MapRoute(
name: "Default",
url: "{controller}/{action}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
And with the above route I have a custom authorise attribute which starts like this
protected override bool AuthorizeCore(HttpContextBase httpContext)
{
String Value = httpContext.Request["id"];
however the id isn't coming through.
When I take the route away above it does.
Is there anyway I can have the route AND the id in the authorise attribute?