I have a custom virtual role setup to allow read access to content items based on a token in the URL. This was working fine until the 7.5 update to the routing since I was using the 'ClassicLinkRoute'.
but this breaks the CMS routing. I only want the route to run if the querystring is present, so I created a class inheriting from ClassicLinkRoute and over rode the GetRouteData to check for the querystring value and registered my custom route. The override is:
public override RouteData GetRouteData(HttpContextBase httpContext)
{
if (!string.IsNullOrEmpty(httpContext.Request.QueryString["token"]))
{
return base.GetRouteData(httpContext);
}
return null;
}
but this prevents my virtualrole from being picked up.
How can I get this ClassicLinkRoute to work with my custom VirtualRoleProvider?
I have a custom virtual role setup to allow read access to content items based on a token in the URL. This was working fine until the 7.5 update to the routing since I was using the 'ClassicLinkRoute'.
On this document: http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2013/12/Routing-changes-in-75/
we can add the classic route back in using:
but this breaks the CMS routing. I only want the route to run if the querystring is present, so I created a class inheriting from ClassicLinkRoute and over rode the GetRouteData to check for the querystring value and registered my custom route. The override is:
but this prevents my virtualrole from being picked up.
How can I get this ClassicLinkRoute to work with my custom VirtualRoleProvider?