Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 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 October 29th, 2012, 01:53 PM
Registered User
 
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Object reference not set to an instance of an object.

I'm new to asp development and have been working through this book and all of sudden have ran into this issue, searched this forum to see if maybe I can find a solution and have not found anything let alone not only am I new to asp.net I'm new to object programming with my back ground ERP systems and mainframe languages.

I'm on Chapter 7 workflows but was going back through checking my work. Checking on the with WorkflowState.aspx page seemed to work fine until I attempt the Edit function which throws this error:

I have double checked many of times to make sure the code is correct and for the life of me can not figure it out. I am also getting the same sort of message with the WorkflowTransition.aspx on the ediit function, with the exception happening on the MethodInfo[] methods = Type.GetType(workflow.ENTWorkflowObjectName).GetMe thods(BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public);


Please if somebody has suggtions and can explain in very generic I'm a complete idiot terms I would be very gratiful :)

Line 205:
Line 206: //Get all the public instance properties for the object.
Line 207: PropertyInfo[] properties = Type.GetType(workflow.ENTWorkflowObjectName).GetPr operties(BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public);
Line 208:
Line 209: //Populate the table with all the fields.

Source File: c:\PROJECTS\Visual Studio 2010\HNA_VacationTracking\PaidTimeOffUI\Administra tion\WorkflowState.aspx.cs Line: 207

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
Administration_WorkflowState.LoadPropertiesTable(I nt32 entWorkflowId, ENTWFStateEO entWFStateEO) in c:\PROJECTS\Visual Studio 2010\HNA_VacationTracking\PaidTimeOffUI\Administra tion\WorkflowState.aspx.cs:207
Administration_WorkflowState.LoadScreenFromObject( ENTWFStateEO baseEO) in c:\PROJECTS\Visual Studio 2010\HNA_VacationTracking\PaidTimeOffUI\Administra tion\WorkflowState.aspx.cs:108
BaseEditPage`1.OnLoad(EventArgs e) in c:\PROJECTS\Visual Studio 2010\HNA_VacationTracking\PaidTimeOffUI\App_Code\B aseEditPage.cs:90
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772



--------------------------------------------------------------------------------
 
Old October 30th, 2012, 11:37 AM
Registered User
 
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Issue solved

Oh boy talk about digging around since the message is pretty cryptic to determine exactly where to look. Nothing wrong with the code it was data related...back to the old saying "Bad data in, bad data out".





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 14 - pg 517 - Item 9 (Object reference not set to an instance of an object. ) jkoyle BOOK: Beginning ASP.NET 4 : in C# and VB 5 August 25th, 2011 08:50 AM
Getting Error: Object reference not set to an instance of an object. oruckenan BOOK: Beginning ASP.NET 4 : in C# and VB 2 August 23rd, 2011 02:18 PM
Error - Object reference not set to an instance of an object Phil Critchley ASP.NET 4 General Discussion 2 April 30th, 2011 05:18 AM
Object reference not set to an instance of an object. dotnet_user C# 2008 aka C# 3.0 2 April 6th, 2011 06:11 AM
Chap 13 pg448: Object reference not set to an instance of an object tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 August 8th, 2009 06:14 AM





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