ASP.NET - Asp Security through web.config to access pages

Asked By abdul rehman on 08-Apr-13 09:17 AM

i have 3 roles (admin,hr,employee) and user's( admin as ram, hr as raheem, employee as sham,ravi,john)
In admin folder if any one try to acreess the page(login fail) it should directly  go to home page give msg invalid user n psw
it it same aplly to hr also but admin can have authority to access hr pages(in folder) but hr should not acess admin folder(pages) authentication should be based on roles and user names
please send me a sample code so that i can understand

Thanks & Regards
Abdul Rehman