Lifecycle question regarding master pages

G

Guest

I've been having a recurring issue with master page authentication. Right
now, I have verification code in the Page_Init event of the master page,
which checks the Page.User object to make sure the Membership object is still
alive. If not, it redirects to the login page. If so, it lets the user see
whatever page they were after. My issue is that it seems sometimes this event
doesn't fire when it's supposed to, and I'll get "object refrence not set to
an instance of an object" errors specifically on the call for the User object.

Anybody know how to fix this problem?
 
B

bruce barker

the master page is a control on the actual page. this means its oninit
fires when other page controls fire, not necessarily first.

you validation code should probably be in BeginRequest in the
application object.


-- bruce (sqlwork.com)
 
G

Guest

The problem with that is that there are three different areas that require
different authentication... each area has its' own master page checking to
make sure the user object is in the right group to be viewing that part of
the website.
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top