Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Lifecycle question regarding master pages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dsorrell - 13 Sep 2007 21:54 GMT
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?
bruce barker - 13 Sep 2007 22:58 GMT
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)

> 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,
[quoted text clipped - 5 lines]
>
> Anybody know how to fix this problem?
dsorrell - 14 Sep 2007 13:56 GMT
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.

> the master page is a control on the actual page. this means its oninit
> fires when other page controls fire, not necessarily first.
[quoted text clipped - 13 lines]
> >
> > Anybody know how to fix this problem?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.