Click here to Skip to main content
15,884,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am trying to build an web application in which,
1. Contains Master page and internal pages (Content pages to Master page).
2.When application is started, user is taken to Login.aspx page (which is not a content page of Master page.)
3. Once user is valid (authenticated), he will be redirected to one of the content pages in master page.


I have completed up to this.
I am using <authentication mode="Form">
I also used <authorization>
<deny users="?">

Still,
Problem i am facing is:

When user is shown Login page, If user requests for inter page (say: /TicketAdmin.aspx), The page will be shown to him.

When i checked with HttpContext.Current.User.Identity.IsAuthenticated .. -it returns True for him!


Kindly help...



Regards
Kiran
Posted
Updated 19-Aug-15 4:14am
v2
Comments
F-ES Sitecore 19-Aug-15 11:43am    
I don't really understand your question, but most Master page problems come from people not understanding that the master page is simply wrapped around the content page. It is the *content* page that is actually been accessed. If you think protecting access to the master page is going to stop people accessing content pages then you're mistaken. You need to ensure your content pages are in a folder that anonymous users are denied access to, where the master page is is irrelevant.

1 solution

Just don't show the restricted content to an unauthorized user. What's the problem?
Remember that any user can request any page. It's up to you what to show on this page. The whole purpose of ASP.NET and any other server-side technology is to generate HTML pages and any other resources dynamically, depending on some data, in response to HTTP request.

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900