Hi there, 
        
The issue MR-ISSUE-555 was just created by Daniel A. Schilling (dschilling).
        
        Key: MR-ISSUE-555
        Summary: NullReferenceException from PersistFlashItems() on IIS7 
without runAllManagedModulesForAllRequests
        Type: Bug
        Importance: High
        
        Description:
        Steps To Reproduce:
1. On IIS7 running in Integrated Mode, create a route similar to the following:
    RoutingModuleEx.Engine.Add(new PatternRoute("customerHome", "/<customer>")
        .DefaultForArea().IsEmpty
        .DefaultForController().Is("Home")
        .DefaultForAction().Is("Index"));
2. Delete the 
"/configuration/system.webServer/modules/@runAllManagedModulesForAllRequests" 
attribute or set it to false.
3. Navigate to "http://localhost/customerA";.
What happens:
[NullReferenceException: Object reference not set to an instance of an object.]
   Castle.MonoRail.Framework.BaseHttpHandler.PersistFlashItems() in 
c:\TeamCity\buildAgent\work\6f0fcaf6ab53174a\MonoRail\Castle.MonoRail.Framework\BaseHttpHandler.cs:234
   Castle.MonoRail.Framework.BaseHttpHandler.AfterControllerProcess() in 
c:\TeamCity\buildAgent\work\6f0fcaf6ab53174a\MonoRail\Castle.MonoRail.Framework\BaseHttpHandler.cs:127
   Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext context) in 
c:\TeamCity\buildAgent\work\6f0fcaf6ab53174a\MonoRail\Castle.MonoRail.Framework\BaseHttpHandler.cs:116
   
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
 +598
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& 
completedSynchronously) +170
What I expected to happen:
The exception was thrown because engineContext.Session was null because IIS 
didn't execute the SessionStateModule.  Monorail expected the Session to be 
non-null.  
Instead of throwing NullReferenceException, it should throw a different 
exception that indicates that the Session was not initialized, and preferably 
with a helpful message telling you to set the 
"runAllManagedModulesForAllRequests" attribute.
        
For more, see 
http://support.castleproject.org/projects/MR/issues/view/MR-ISSUE-555
 
        
--
donjon
by Castle Stronghold
http://www.castle-donjon.com


--

You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en.


Reply via email to