Onsager computed the partition function of the 2D periodic square lattice (toroidal boundaries) Ising model. It is arguably one of the most elegant proof of modern statistical mechanics.
The original paper is available on the APS website below: (you will need institutional access)
L. Onsager, "Crystal Statistics. I. A Two-Dimensional Model with an Order-Disorder Transition", Phys. Rev. (65), 1944. Link
Although I found it laying around on some university server: http://www.colorado.edu/physics/phys7230/phys7230_sp08/Onsager1944.pdf
In essence, he obtains the partition function
$$Z(\beta,N,H=0)=(2\cosh(2\beta J) e^I)^N$$
with
$$I=\frac{1}{2\pi}\int_0^\pi d\phi\ln\left(\frac{1}{2}\left[1+(1-\kappa^2\sin^2\phi)^{1/2}\right]\right)$$
where
$$\kappa=\frac{2\sinh(2\beta J)}{\cosh^2(2\beta J)} $$
Traditionnal canonical ensemble techniques can be applied from there. Note that the free energy associated to $Z(\beta,N,0)$ is non analytic and that a phase transition arises when $\kappa=1$ . This correctly predicts that $T_c=\frac{2J}{k\ln(1+\sqrt{2})}$