Authentication

  • Thread starter Thread starter Luke Ward
  • Start date Start date
L

Luke Ward

Hi

So far my application simply requests a user name and password, if user name
and pass match an entry in the database then the page is loaded.
------> FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, false);

For some pages I want to check for a permission level, what is the best way?
I am thinking I need to some how identify pages that require higher
permission levels to the Login.aspx, then Login.aspx can check for a bit
being set in DB or something?

I could use session vars, but was wondering if there is a mechanism built
into .Net?

Any comments welcomed.

Thanks

Luke
 
You can use a tinyint (0-255), and assign varying permission levels. Storing in session is always a good option.
 
Hi

So far my application simply requests a user name and password, if
user name and pass match an entry in the database then the page is
loaded. ------>
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, false);

For some pages I want to check for a permission level, what is the
best way? I am thinking I need to some how identify pages that require
higher permission levels to the Login.aspx, then Login.aspx can check
for a bit being set in DB or something?

I could use session vars, but was wondering if there is a mechanism
built into .Net?

Any comments welcomed.

Thanks

Luke

It is always a good idea to check on each page if the user is authentic and
has not just jumped into the middle of the web application (depending on
the application, of course).
 

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

Back
Top