Use the Biot-Savart law (most conveniently in the form of Eq. 5.42 appropriate to surface currents) to find the field inside and outside an infinitely long solenoid of radius R, with n turns per unit length, carrying a steady current I.
B ( r )=\frac{\mu_{0}}{4 \pi} \int \frac{ K \left( r ^{\prime}\right) \times \hat{ ᴫ }}{ᴫ^{2}} d a^{\prime} and B ( r )=\frac{\mu_{0}}{4 \pi} \int \frac{ J \left( r ^{\prime}\right) \times \hat{ᴫ}}{ᴫ^{2}} d \tau^{\prime} (5.42)