Pages User Permissions

  • Thread starter Thread starter ruca
  • Start date Start date
R

ruca

hi,

How can I setup the user permissions over some pages of my web application?
I want to deny that some users access some of my web pages. How can I do
this in code?

At this moment I have a session variable that have False or True value. I
get this value from my DB.
Then in my Page_Load event I have this:

Sub Page_Load (...)
If CBool(Session.Item("bValue")) Then
//some code here
Else
Page.Controls.Clear()
Response.Redirect("dcsError.htm", False)
End If
End Sub

but I think that must be another way to do this
 
How can I setup the user permissions over some pages of my web
application?
I want to deny that some users access some of my web pages. How can I do
this in code?
At this moment I have a session variable that have False or True value. I
get this value from my DB.

You don't want to do that, .NET has authentication abilities built in that
are quite nice, and easy to use.

See this article:
http://msdn.microsoft.com/library/d.../dnaspp/html/aspnet-jspmig-authentication.asp


HTH,
Jeremy
 
Back
Top