deepti
deepti

Reputation: 729

Authorization and Authentication in asp.net

Iam using forms authentication in asp.net Application,i want to make pages accessible depending upon roles defined in database. for eg there are three rolesdefined in database salary admin, manager, Clerk. i want a page salary.aspx can be accessed only by salary admin and not any other roles.How to go about, your help will be appreciated

Upvotes: 0

Views: 150

Answers (1)

Menahem
Menahem

Reputation: 4144

I think using the ASP.NET membership provider is a good option. here is a link to a full walkthrough, and another nice link from asp.net site

EDIT: just to get the details out the comments (adapted from MSDN):

<configuration>
   <location path="/somepage.aspx">
       <system.web>
            <authorization>
               <allow roles="SomeRole" />
               <deny users="*" />
            </authorization>
          </system.web>
        </location>
<configuration>

Upvotes: 1

Related Questions