Solved

UIP 2.0 Navigation Error

Posted on 2007-11-28
4
538 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 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio hangs on running project 6 84
C# Service FileSystemwatcher isse 9 64
GET INFO ABOUT WHAT THE PRINTER IS DOING ? 11 75
Difference between Highcharts and Mapbox 10 44
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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