AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 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 Your Reply Post New Question

 Viewer's Reply
Authorization Problem
Answered By Prakash Samariya on 5/3/2008 4:22:31 AM
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.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
SearchSAP
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks - Free 158 Page Preview
The Art & Science of JavaScript - Free 100 Page Preview!