Pages User Permissions

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
 
J

Jeremy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top