Redirect unauthenticated users to my own login page
Hello,
I have demo folder in my sitefinity app. Demo folder contains pdf files. I want to do something like when someone search pdf and click on it, user must be redirect to my custom login page instead of sitefinity login page. I did the below code in web.config file and it works fine but i am redirecting to sitefinity login page. I want to redirect users to my custom login page. Can any one suggest me the code or something help !! Here is the web.config code:
<location path="doc">
<system.web>
<authorization>
<allow users="Admin"/>
<deny users="*"/>
<!--Deny everyone else Admin role Users-->
</authorization>
</system.web>
</location>
Hi,
I have already responded in your support ticket.
Regards,It would be nice to see the solution here as well.
The only way we could get it to work is to use the SF permissions to handle it. So in the advanced settings setup the frontendlogin url. That tells SF which page to load when the user doesn't have permissions.
The PROBLEM is that the pages\resources need to be physical sitefinity assets. So like an external ASPX page secured with the webconfig would be totally hosed because it then goes to /Sitefinity/Login
Hi all,
The way I managed to achieve this result is by using the custom handler to plugin your logic in the IMediaContentDownloadEvent which is executed each time a media content is being downloaded or viewed. Note to check if the content is a document there.
Additionally you should be able to globally set the permissions from the parent object (the library) - see video. So I would suggest to have one library which is only for documents of this type and set the permissions directly from the library - the documents should inherit their permissions form it. I would also suggest to either remove the Allow: Authenticated or Deny: Anonymous.