Solved

UIP 2.0 Navigation Error

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now