Author: mrconfused786 | Posted on: 3/17/2010 11:47:09 PM | Views : 305

Hello,
1. How do i limit access to admin directory to only admin roles ?I logged in with a user whose role is Customer and went to the url of mysite.com/admin/ and it shows be the directory listing for that directory.

2. Have I implemented the roles/web.config correctly ?


//Web.config <!-- Deny anonymous access to private area --> <location path="~/private"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> <location path="~/admin"> <system.web> <authorization> <allow roles="EA"/> <deny users="*" /> </authorization> </system.web> </location> //login page protected void btnLogin_Click(object sender, EventArgs e) { String[ ...

Go to the complete details ...