Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

UIP 2.0 Navigation Error

Posted on 2007-11-28
4
Medium Priority
?
558 Views
Last Modified: 2013-11-07
I am in the process of converting an application from the .net 1.1 framework to .net 2.0 that uses the Microsoft UIP Application block.  This app uses a graph navigator which hasn't changed during conversion.  When I start the app and try to test each of the views, I randomly receive the error:

Object reference not set to an instance of an object.

Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
   Microsoft.ApplicationBlocks.UIProcess.ViewManagerFactory.Create() +166
   Microsoft.ApplicationBlocks.UIProcess.OpenNavigator..ctor(String name, Guid taskId) +45
    System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Does anyone have an idea as to what would cause this?
0
Comment
Question by:sarah_newcom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20367722
Please post the lines of source code around the error line.
0
 

Author Comment

by:sarah_newcom
ID: 20367835
Sorry about that.
Here is my source code (at least where I think it is breaking):

public void NavigateBreadCrumb(string NavigateTo)
{      
           Navigate(NavigateTo);
}

I've stepped through this code, and the NavigateTo parameter is always populated with the view name that I want to navigate to.

Here is the UIP portion of my config file:
<uipConfiguration enableStateCache="true" allowBackButton="false">
    <objectTypes>
      <iViewManager name="WebFormViewManager" type="Humana.ApplicationBlocks.UIProcess.WebFormViewManager,Humana.ApplicationBlocks.UIProcess,Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
      <state name="WebState" type="Humana.ApplicationBlocks.UIProcess.WebState,Humana.ApplicationBlocks.UIProcess,Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
      <controller name="ReportsController" type="Humana.EnterpriseFR.Reports.Controllers.ReportsController, Humana.EnterpriseFR.Reports, Version=1.0.0.0,Culture=neutral,PublicKeyToken=null" />
      <statePersistenceProvider name="WebStatePersistence" type="Humana.ApplicationBlocks.UIProcess.WebStatePersistence,Humana.ApplicationBlocks.UIProcess, Version=1.0.0.0,Culture=neutral, PublicKeyToken=null" />
    </objectTypes>
    <views>
      <view name="MenuHome" type="ReportsMenu.aspx" controller="ReportsController" />
      <view name="LoadActivityReport" type="ActivityReport.aspx" controller="ReportsController" />
      <view name="LoadErrorReport" type="ErrorReport.aspx" controller="ReportsController" />
    </views>
    <navigationGraph iViewManager="WebFormViewManager" name="ActivityReport" state="WebState" statePersist="WebStatePersistence" startView="LoadActivityReport" cacheExpirationMode="Absolute" cacheExpirationInterval="12:00:00">
      <node view="LoadActivityReport">
        <navigateTo navigateValue="Redisplay" view="LoadActivityReport" />
        <navigateTo navigateValue="Exit" view="MenuHome" />
      </node>
    </navigationGraph>
    <navigationGraph iViewManager="WebFormViewManager" name="ErrorReport" state="WebState" statePersist="WebStatePersistence" startView="LoadErrorReport" cacheExpirationMode="Absolute" cacheExpirationInterval="12:00:00">
      <node view="LoadErrorReport">
        <navigateTo navigateValue="Exit" view="MenuHome" />
        <navigateTo navigateValue="Redisplay" view="LoadErrorReport" />
      </node>
    </navigationGraph>
  </uipConfiguration>

Thanks!

0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 20367872
doesn't help so much. are you sure the error is there, of maybe before calling that method?

Also, check if the NavigateTo is not null:

public void NavigateBreadCrumb(string NavigateTo)
{      
        if (NavigateTo != null)
           Navigate(NavigateTo);
        else
        {
                   // show some error message here
          }
}
0
 

Author Comment

by:sarah_newcom
ID: 20368314
Jaime,
You were right, that isn't where the error is located.  When I step through the code it occurs after the navigate statement.  It's erroring out somewhere between the end of the navigate call and the page_load event of the next view.  Not sure why this is happening since it all works without fail with the 1.4 version.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Screencast - Getting to Know the Pipeline

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question