i have few pages in asp.net ,
when a user logs in then i want t give him access to 4 out of 10 pages, mean he can only view 4 pages out of 10, else are for admin + superadmin,
so how could i assign him authority to few pages ? and restrict from other ,
Ok, this is a big topic. There's quite a bit of information out on the Internet on how to do this. I am going to suggest that you visit these links and read over the information. This is same info that I refer to when I need to integrate authentication in my projects.
Since you are using C#:
How To Implement Forms-Based Authentication in Your ASP.NET Application by Using C#.NET
More information about forms based authentication:
Using Basic Forms Authentication in ASP.NET
Great resource over asp.net security (a must read):
Again, you can code all of this by hand, use session variables, keep roles in a database table, but before you do so, take a look at what asp.net built-in controls and objects can do for you.
but requirement is to code by hand, lines of code, you know
so i kept 3 roles in db, and 1,2,3 for admin, subadmin, and applicant
and used session variables to store user email after login , but problem is that he/she can view all pages , so how to restrict via code ? like i made db roles+ sessions
in your code behind, check for the session variable. If its empty, send the user to the login page. If not, check to see what role the user logged in as. If its an admin page and the user is not an admin, redirect them to a "unauthorized page", or appropriate page.
APLX is a very complete implementation of the APL programming language from MicroAPL. The company stopped producing it in 2016 and it has been taken over by Dyalog. While Dyalog ...
I recently had to mass insert a really large text file of strings into MySQL. Here's how I did it.
I am working on a project to view pdf files online and merge it into single pdf file. For that, I don't know which programming language and tool is ...