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
Solved

UIP 2.0 Navigation Error

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

How our DevOps Teams Maximize Uptime

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net Tranfer data between to VB.Net apps 8 40
Help with error in Query 2 31
Changes to XXX.exe.config file are not retrieved on restart. 3 39
Where is this file? 3 25
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…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

856 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