AspdotnetCodes.com
US and UK Data Centers – DiscountASP.NET
 
Articles Subscribe for our Articles Updates
Books
Resources
Downloads
Free Tech Magazines
Archives
Softwares
Newsletter
Suggest Us
Link to Us
 web.config probs
Posted by manikandan on  3/29/2008 5:59:20 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
  
I have to created user table from sqlserver .attribute name as username password,roles .. and here i have insert datas to sqlserver

username :mani
Password:mani
role:user

username :raj
Password:mani
role:admin
the role =user that all the user don't allow to issused.aspx pages admin user only allowed to issused.aspx page

how to solved this problems

Post Answer Post New Question

 Viewer's Answers
Authorization Problem
Posted By Prakash Samariya on 5/3/2008 4:22:31 AM
Description:
You have to make little change in web.config for this.

Following example allows "admin" role based users to access particulat page.

//----------------------------------------
<location path="issused.aspx">
<system.web>
<authentication mode="Forms">
<forms name="iPage" loginUrl="Login.aspx" />
</authentication>

<authorization>
<allow roles="admin" />
<deny users="*" />
</authorization>
</system.web>
</location>
//----------------------------------------

This may help u to resolve problem.
 
Sponsored by