This project is read-only.
1
Vote

Address Book Reference Application fails OOTB

description

Set Up: Windows 7 + VS2010 targeting 3.5 or 4.0
 
Out of the box a FlowException is thrown on the first and subsequent page loads.
 
The Exception does not seem to disrupt functionality of the demo application (except for causing the debugger to break) and the error occurs after the content has loaded into the browser almost as if it is handling a second request.
 
IE8 and Chrome were used to test this.
 
The Exception is thrown on the third traversal through the method below in AppHandler.cs. The if block evaluates to true for the first two traversals and false for the third - throwing an exception in the third statement of the else block.
 
Here is the method in question:
 
protected internal virtual void ProcessRequest(HttpContextBase httpContext)
    {
        //AddVersionHeader(httpContext);    
        ManagedFlow flow;
        if(!string.IsNullOrEmpty(RequestContext.GetState())) 
        {                                                                                //true block is hit 2 times
            var flowViewSerializer = FlowViewServiceBuilder.GetFlowViewService();
            flow = flowViewSerializer.Deserialize(RequestContext.GetKey(), RequestContext);      
        }
        else                                                                          //else block hit third and final time _after_ page shows up in browser
        {
            var flowDefinition = FlowService.GetFlowDefinition(RequestContext.GetKey());
            if (flowDefinition == null)
                throw new FlowException("No such flow found");
                                                                                                     //Exception thrown here -------------------------------
            flow = new ManagedFlow(Guid.NewGuid(), flowDefinition.Name, flowDefinition.StartupNavigation,
                                   flowDefinition.Redirectable,
                                   flowDefinition.RedirectUrl);
        }            
        ApplicationController.Execute(RequestContext, flow);
    }
 
 
Screenshot attached.

file attachments

comments