Solved

UIP 2.0 Navigation Error

Posted on 2007-11-28
4
510 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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