I am trying to restrict users access to certain pages in my asp.net 2.0 app.
What I have done is I check the users permissions (based on data stored in
database) on the page load event of the page. If they dont have access I just
do a response.redire ct to another page.
So it works something like this..
Page Load Event
If ispostback=fals e then
if userHasPermissi on = false then
response.redire ct("somewhereel se.aspx")
end if
end if
Should I be doing this check on some other page event, or is there a way a
smart user could bypass this check and get access to the page?
What I have done is I check the users permissions (based on data stored in
database) on the page load event of the page. If they dont have access I just
do a response.redire ct to another page.
So it works something like this..
Page Load Event
If ispostback=fals e then
if userHasPermissi on = false then
response.redire ct("somewhereel se.aspx")
end if
end if
Should I be doing this check on some other page event, or is there a way a
smart user could bypass this check and get access to the page?
Comment