We present a general procedure for obtaining an exact confidence set for the variance components in a mixed linear model. The procedure can be viewed as a generalization of the ANOVA method used with balanced models. Our procedure uses, as pivotal quantities, quadratic forms that are distributed independently as chi-squared variables. These quadratic forms are constructed with reference to spaces that are orthogonal with respect to the covariance matrix of the observation vector, which is a function of the variance components. For balanced models, these pivotal quantities simplify to multiples of the sums of squares used in the ANOVA method. An exact confidence set for the vector of ratios of the effect variances to the error variance is also presented, based on the same collection of quadratic forms. Computing formulas for calculating approximations to these confidence sets are presented, and the results of their application to several two-way data sets are given.