The problem was in the content page.
I solved it with a workaround:
The page was in an inner folder so the type of the page was innerFolder_XXXPage but the
GetCallbackEventReference function returned 'XXXPage' as the first parameter to the callback.
When the Page.ProcessRequestMain check if the request is a callback, it does not find a control with such name so it raise an exception.
To solve it, I override the FindControl method in the page:
public override Control FindControl(string id)
Control ctl = base.FindControl(id);
if (IsCallback && ctl == null && id == this.Page.GetType().BaseType.FullName)