We present the discovery, from archival Chandra and XMM-Newton data, of X-ray eclipses in two ultraluminous X-ray sources (ULXs), located in the same region of the galaxy M51: CXOM51 J132940.0+471237 (ULX-1, for simplicity) and CXOM51 J132939.5+471244 (ULX-2). Three eclipses were detected for ULX-1 and two for ULX-2. The presence of eclipses puts strong constraints on the viewing angle, suggesting that both ULXs are seen almost edge-on and are certainly not beamed toward us. Despite the similar viewing angles and luminosities ( »Ĺ 2 10 X 39 erg s −1 in the 0.3-8 keV band for both sources), their X-ray properties are different. ULX-1 has a soft spectrum, well fitted by Comptonization emission from a medium with electron temperature » kT 1 keV e . ULX-2 is harder, well fitted by a slim disk with » kT 1.5 in -1.8 keV and normalization consistent with a ∼10 M e black hole. ULX-1 has a significant contribution from multi-temperature thermal-plasma emission ( »Ĺ 2 10 X,mekal 38 erg s −1 ). About 10% of this emission remains visible during the eclipses, proving that the emitting gas comes from a region slightly more extended than the size of the donor star. From the sequence and duration of the Chandra observations in and out of eclipse, we constrain the binary period of ULX-1 to be either »6.3 days, or ≈12.5-13 days. If the donor star fills its Roche lobe (a plausible assumption for ULXs), both cases require an evolved donor, most likely a blue supergiant, given the young age of the stellar population in that Galactic environment.