More in this section
Forums / Bugs & Issues / Redirect unauthenticated users to my own login page

Redirect unauthenticated users to my own login page

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Srk
    Srk avatar
    13 posts
    28 Feb 2012
    22 Jun 2013
    Link to this post
    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 ofsitefinity login page. I did the below code in web.config file and it works fine but i am redirecting tositefinity 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">
            <allow users="Admin"/>
            <deny users="*"/>
            <!--Deny everyone else Admin role Users-->
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    10 Nov 2016
    26 Jun 2013
    Link to this post

    Thank you for using our services!

    You can set permissions to the .pdf that shouldn't be visible for Anonymous users. Please take a look at this blog post,where we show how an Unauthorized event can be used in the Global.asax file.
    This event is fired, whenever a user that doesn't have permissions, is redirected to some page. I believe it will suit your scenario.

    Let me know if you have any additional questions!

    Jen Peleva
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Srk
    Srk avatar
    13 posts
    28 Feb 2012
    27 Jun 2013 in reply to Jen Peleva
    Link to this post

    Thanks for reply. I am facing this issue from a week. I tried the post you given earlier also but every time it is redirecting me to sitefinity login page. Than i put debug point in global.asax file and saw in  global.asax that application_start event is not firing. How should i create custom authorization.!! As i mentioned earlier in my first question i put a piece of code in web.config. Is it the right way ??

    Another thing i tried is to create custom handler ihttphandler and it is working but only statik pdf links not for the pdfs that i uploaded from documents & files.!!

    I am asking for pdfs becuase i search pdfs with  search and search results widget and than if any user clicks on pdf link than he/she must be redirected to my custom login page.

    Please provide the solution asap.

    Thanks & Regards.
3 posts, 0 answered