Measurement of D+ and D0 production with ZEUS at HERA Production of D+- and D0 mesons was measured with the ZEUS detector at HERA using an integrated luminosity of 133.6 pb-1. The measurements cover the kinematic range 5 < Q^2 < 1000 GeV^2, 0.02 < y < 0.7, 1.5 < p_T^D < 15 GeV and |eta^D| < 1.6. Combinatorial background to the D meson signals was reduced by using the ZEUS micro-vertex detector to reconstruct displaced secondary vertices. Production cross sections are compared with the predictions of next-to-leading order QCD which is found to describe the data well. The measurements were extrapolated to the full kinematic phase space in order to determine the open-charm contribution, F2c, to the proton structure function, F2.