Multimple RenderAction error

Jun 6, 2009 at 6:30 PM

There is o problem when calling twice or more one action of the same controller.

For exemple:

Html.RenderAction<StoryController>(c => c.PromotedBy(userId, 2));
Html.RenderAction<StoryController>(c => c.PromotedBy(userId, page));

Both RenderActions will be executed with first call params (page=2).

I think it's a problem with ControllerFactory or...

Jun 6, 2009 at 7:10 PM

I found the problem! :)

The problem is in Web.config: <lifetime type="PerWebRequest"/> - controller must NOT be PerWebRequest lifetime

It generated me a lot of problems!