We describe a setup for the x-ray detection of ferromagnetic resonance in the longitudinal geometry using element-specific transmission measurements. Thin magnetic film samples are placed in a static magnetic field collinear with the propagation direction of a polarized soft x-ray beam and driven to ferromagnetic resonance by a continuous wave microwave magnetic field perpendicular to it. The transmitted photon flux is measured both as a function of the x-ray photon energy and as a function of the applied static magnetic field. We report experiments performed on a 15 nm film of doped Permalloy (Ni73Fe18Gd7Co2) at the L3/L2-edges of Fe, Co, and Ni. The achieved ferromagnetic resonance sensitivity is about 0.1 monolayers/math. The obtained results are interpreted in the framework of a conductivity tensor based formalism. The factors limiting the sensitivity as well as different approaches for the x-ray detection of ferromagnetic resonance are discussed.