p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio (http://p2p.wrox.com/forumdisplay.php?f=477)
-   -   Object reference not set to an instance of an object. (http://p2p.wrox.com/showthread.php?t=88701)

SandraDiehl October 29th, 2012 01:53 PM

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



--------------------------------------------------------------------------------

SandraDiehl October 30th, 2012 11:37 AM

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".


All times are GMT -4. The time now is 05:30 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.