I have created one website. In that website it has different folders. I have given permission to only admins . I have created admin role and client role. when anonymous persons want to access web page in the folder. It should automatically redirected to the login page.
In page_load event what should i write I am not getting any idea. I have tried a lot.
plz help me.
thanq.

Krishna GaradRank #191 · 12.8K reputationPosted Jul 8, 2011, 9:06 PM EDT
1) Add web.confige file in folders and write
2) In page_load
if (User.Identity.IsAuthenticated)
{
this.Page.Visible = true;
}
else
{
Response.Redirect("login.aspx");
}
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Jul 8, 2011, 9:15 PM EDT
refer this link;
Link