The density of states (DOS) in amorphous silicon is a key parameter in assessing the performances of photocells made of this material. The principle of the determination of the DOS by the study of the space-charge-limited current (SCLC) had first been given by den Boer in an approximate but very physical model. We have found that a precise determination of the DOS in amorphous silicon by this method requires special precautions, both theoretical and experimental: it is only after elimination of most of the pollution by the electrodes and walls of the chamber that we have found that the scaling law is valid with good precision, and only for films thicker than $d=1.5$ \ensuremath{\mu}m; in the usual experimental conditions (current density 1 ${\mathrm{A}/\mathrm{c}\mathrm{m}}^{2}$), the situation is intermediate between the low-injection condition (Ohm's law) and the high-injection condition, so that the asymptotic solutions given by the regional approximation, as used by previous authors, are not valid. By comparing the experimental curves with the exact solutions obtained by numerical integration of the SCLC equations, we have determined the DOS in amorphous silicon films with an estimated uncertainty of 15%. The application of the method to a series of films produced by capacitive glow discharge shows the following: (a) the DOS at the Fermi level is very sensitive to the quality of the pumping system (pollution by air, ${\mathrm{H}}_{2}$O, pumping oil), the best value obtained in our films being $5\ifmmode\times\else\texttimes\fi{}{10}^{15}$ ${\mathrm{cm}}^{\ensuremath{-}3}$${\mathrm{eV}}^{\ensuremath{-}1}$; (b) for films produced in identical conditions, there is a well-defined minimum of the DOS at a preparation temperature ${T}_{s}=260\ifmmode^\circ\else\textdegree\fi{}\mathrm{C}$, which explains why most of the best photocells are prepared at this temperature; (c) the DOS in the first 2000-4000 \AA{} of the films is larger by a factor of 3-10 than that in the rest of the film. This has a direct implication for the fabrication of photocells which have a thickness only 2-3 times this perturbed region. The cause of this effect, whether it is an intrinsic surface effect or external effect, corrected by self-cleaning after a few minutes of plasma, remains to be determined.