There is no need for trial and error, just use what the manufacturer of the foam recommends. Why is this so tough? If none is recommended... then you have to do some searching. If the instructions say to NOT use epoxy, then I am not going to use it no matter what an internet "expert" tells me.
ORIGINAL: BFoote
Most glues, while maybe not ideal, will stick well enough to do the job.
When it comes to foams/glues its trial and error.
=)