Workflow Soluiton

 View Only
  • 1.  Response.Redirect cannot be called in a Page callback

    Posted Sep 23, 2011 09:44 AM

    I have an issue that is not consistently occuring.  I have a form that acts as a home page with several buttons leading to other forms.  One button is Exit, which goes to a simple Terminate Window And Close Dialog then End component.

    One of the linked to forms has the user fill in some data and click Done, which processes the form and takes you back to the home page.

    I'd say about 50% of the time it works as intended, the data posts to the database and the home page is displayed.

    The other 50% of the time, the user gets an application error.  All the data the user entered posts to the database successfully, so it seems to be tripping up on moving from the form back to the home page.  This is the error I get:

     

    Exception Component Name: Terminate Window And Close Dialog

    Exception Trigger Message: Response.Redirect cannot be called in a Page callback.

    Exception Trigger Stack Trace: System.ApplicationException: Response.Redirect cannot be called in a Page callback. at System.Web.HttpResponse.Redirect(String url, Boolean endResponse) at LogicBase.Core.Models.Dialog.DialogExecutionDelegate.Execute(HttpContext context, DialogState state) at LogicBase.Core.Models.Dialog.AbstractDialogExecutionDelegate.LogicBase.Core.ExecutionEngine.IExecutionDelegate.Execute(IData data, IOrchestrationComponent component, String& outputPath, IExecutionEngine engine, TLExecutionContext context) at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)

     

    Since this doesn't consistently occur, troubleshooting gets to be a bit of a bear.  Plus, I can't reproduce this in my debugger... only once it's been published.

    Has anyone seen this error before and know what triggers it?



  • 2.  RE: Response.Redirect cannot be called in a Page callback

    Posted Sep 23, 2011 02:36 PM

    Is it a seperate form all togerther? or another model in the same form?

    If it's to another form compeltely, un check the "Pass Process Manager Sessiion ID", and make sure the URL you are passing does not have a session ID in it. The Session ID's are time sensitive. If a user spends too much time on a form, the session from the original home form may time out. If you try to return to the same session ID, and it's expired, you get an error message.

    If it's in the same project and it's just another model, then you should not be using the terminate dialog, just link back to the original model.

    Rob



  • 3.  RE: Response.Redirect cannot be called in a Page callback

    Posted Sep 27, 2011 05:02 PM

    It's within the same Web Form.  It's moving from a linked model to the primary model.  The linked model doesn't have any terminate dialog forms, except for one that I've noticed embedded in the UserSearchSubDialogComponent.  So, really the only deliberately placed terminate dialog I have is on the Home Page, and in theory it should only execute if you click on the Exit button on the form.  However, this error is occurring before the home page comes up again.

    I'm confuzzled.

    Kevin