> I am validating the users of my web app against a user database in SQL
> Server. I then store the user object in a session variable and pass it
[quoted text clipped - 6 lines]
> otherwise alert them to the fact that the form is for administrators only.
> What is the best way to do this?
Hi Bill
you can check it in the code-behind
If Not User.IsInRole("Administrator") Then
Response.Write("Only administrators can see this form")
End If
you can set permissions in web.config
<location path="admin.aspx">
<system.web>
<authorization>
<allow roles="Administrator" />
<deny users="*" />
</authorization>
</system.web>
</location>
Hope this helps
Alexey Smirnov - 04 Aug 2007 09:22 GMT
> > I am validating the users of my web app against a user database in SQL
> > Server. I then store the user object in a session variable and pass it
[quoted text clipped - 27 lines]
>
> Hope this helps
P.S. I assume that you created a FormsAuthenticationTicket with roles
and assigned it the user