In this paper, some initial-boundary-value problems for the time-fractional diffusion equation are first considered in open bounded n-dimensional domains. In particular, the maximum principle well-known for the PDEs of elliptic and parabolic types is extended for the time-fractional diffusion equation. In its turn, the maximum principle is used to show the uniqueness of solution to the initial-boundary-value problems for the time-fractional diffusion equation. The generalized solution in the sense of Vladimirov is then constructed in form of a Fourier series with respect to the eigenfunctions of a certain Sturm-Liouville eigenvalue problem. For the onedimensional time-fractional diffusion equationthe generalized solution to the initial-boundary-value problem with Dirichlet boundary conditions is shown to be a solution in the classical sense. Properties of this solution are investigated including its smoothness and asymptotics for some special cases of the source function.MSC 2010 : Primary 26A33, Secondary 35B45, 35B50, 45K05