I need to add a Restrict on a document file path accessed from Sitefinity if there is no value in session. I have an URL to documents stored in CMS like below
"~/docs/default-source/documentlibraryname/documentname.doc"
I Need to do some restriction in code when I try to access any direct path from Sitefinity.
public override RouteData GetRouteData(HttpContextBase httpContext)
{
var virtualPath = base.GetVirtualPathInternal(httpContext);
}
It's only giving ~/favicon.icon
in virtualPath
so cant get specific URL. I have tried Httphandler and also SitefinityRoute implementations for the same.
If anyone has any suggestions please help.