An vectorial mode solver for microstructured optical fibers based on the representation of the longitudinal components of the mode fields at the interfaces of media in the fiber cross section by Fourier series in angular variables is formulated. The coefficients of the series are found from a homogeneous algebraic system solved by the reduction method. The matrix elements of the system are determined on the basis of the Green's theorem, which is considered in the internal and external regions of the fiber cross section and the inclusions that form the microstructure. The elements are represented by regular integrals, i.e. difficulties associated with the singularities of the Green's functions are absent. The applicability of the approach is limited only by the requirement that the contours of the inclusions and the outer boundary of the fiber are described by single-valued functions of the angular variables. In the special case of a circular dielectric waveguide, the method gives an exact analytical solution of the waveguide problem. Estimates are obtained for the internal convergence of the method in computing the modes of a dielectric elliptical waveguide and microstructural fibers with elliptical inclusions. It is established that the attenuation coefficients of the modes caused by radiation leakage from the fiber core are significantly affected by both the internal microstructure and the outer fiber boundary. Keywords: microstructured fiber, Green's theorem, Fourier series, internal convergence, leaky modes.