Dense wavelength division multiplexing (D.W.D.M.) significantly increases the optical telecommunicationtransmission rates. To separate the channels, narrow band spectral filters are necessary.Resonant gratings, composed with a grating engraved on a planar waveguide, are apotential solution. These structures support eigenmodes, which can be excited by a wave comingout of an optical fiber. The excitation creates a resonance peak in the reflected beam,for a given wavelength and incidence angle. In general, the peak does not exhibit the qualitiesrequired for the D.W.D.M.: at oblique incidence, the angular and spectral tolerances are weak,and the line shapes are polarization dependent. Combining photonic crystals concepts, a rigorousphenomenological theory, and a perturbative theory, we design a filter that meet all theconditions imposed by the D.W.D.M..Key words: D.W.D.M., filters, resonance, grating,