Restrict a document path from Backend in Sitefinity site

76 Views Asked by At

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.

0

There are 0 best solutions below