Author: markob85 | Posted on: 5/7/2009 5:38:53 PM | Views : 288

 hi
 i tried to follow a tutorial to secure pages and it works
(creating users from the ASP.net config page - creating a role basic user -  affecting the role to user - protecting pages with this code :

 
protected void form1_Load(object sender, EventArgs e)
{
if (User.Identity.IsAuthenticated == false)
{
Server.Transfer("Login.aspx");
}

if (Roles.IsUserInRole("Basic User") == false)
Server.Transfer("unauthorized.aspx");

}
</script>  
 
now and after creating master page, how can i secure my pages which using master pages?? and where i have to put this code?? because i puted it between <head></head> on the master page and it didn't work.
 
thx for help 

...

Go to the complete details ...