Login Control
Hi,
I need to give authorised access to only one aspx page from my project.
Rest all the pages are in sitefinity 4.0
I have create a page in sitefinity and dragged the sitefinity-Login control on that page, and set the redirect path to the 'aspx' page.
My rest of the site is open for everyone.
I achieved the functionality - if user logins through the login page , he will redirect to aspx page.
But the issue is , if that aspx page is access directly by typing URL, then user is able to view the page.
I need to restrict that page access from outside.How it can be done using sitefinity control.
Can i send some parameter to my aspx page from the sitefinity login control page?
Please help.
Thanks
Hi Anu,
You can include some logic in the aspx page code-behnid or inside a script block on the page. For example:
if
(!HttpContext.Current.User.Identity.IsAuthenticated)
Response.Redirect(
"~/MyLoginPage"
);