Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 11th, 2005, 08:58 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Siteheader won't get thru compiler

VB code, VS2003. I have followed the book up thru where modules begins and integrated into my existing website. I believe my problems started when I added the "philepage" to my homepage and now every time I hit the F5 it errors out on the line " If CONTEXT.User.Identity.IsAuthenticated Then" by saying this is not an object. Somehow this line worked on my homepage, but now it is not recognized.

Any suggestions on how I can trace the compiler? I don't know exactly where it is falling apart.

HELP! Thanx, Tom.

 
Old March 13th, 2005, 02:55 PM
Authorized User
 
Join Date: Jun 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Tom -

You may want to go to the codebehind pages of the .aspx pages (hit F7 in Visual Studio), scroll down to the section called "Web Form Designer generated code" (usually collapsed) and check that OnInit(EventArgs e) looks like this:

override protected void OnInit(EventArgs e)
{
  base.OnInit(e);
  InitializeComponent();
}

Make sure that base.OnInit(e) is above InitializeComponent() so that the Phile "page base" is called first. See if this works.

Allen

-----
mencher cat, mencher cat. boo. cattydear. what a lovely!
 
Old March 13th, 2005, 05:59 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx for idea. I have in fact resolved this by correcting an error in NEW() event in the siteidentity.vb page. I commented it out until I could understand what was happening. Now I know. Issue closed, thanx, Tom.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiler Romaunt V. Intro Programming 2 October 18th, 2008 06:27 AM
Context.User in siteheader.ascx.cs scottf BOOK: ASP.NET Website Programming Problem-Design-Solution 7 November 3rd, 2005 12:52 PM
Cannot compile siteheader.ascx.cs golfvilla BOOK: ASP.NET Website Programming Problem-Design-Solution 6 January 19th, 2004 06:27 PM
For all who need a C/C++ compiler... Ammiel C++ Programming 1 July 17th, 2003 01:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.