In this paper, we study linear inverse problems where some generalized moments of an unknown positive measure are observed. We introduce a new construction, called the maximum entropy on the mean method (MEM), which relies on a suitable sequence of finite-dimensional discretized inverse problems. Its advantage is threefold: It allows us to interpret all usual deterministic methods as Bayesian methods; it gives a very convenient way of taking into account prior information; it also leads to new criteria for the existence question concerning the linear inverse problem which will be a starting point for the investigation of superresolution phenomena. The key tool in this work is the large deviations property of some discrete random measure connected with the reconstruction procedure.