We provide a general formulation for calculating conserved charges for
solutions to generally covariant gravitational theories with possibly other
internal gauge symmetries, in any dimensions and with generic asymptotic
behaviors. These solutions are generically specified by a number of exact
(continuous, global) symmetries and some parameters. We define "parametric
variations" as field perturbations generated by variations of the solution
parameters. Employing the covariant phase space method, we establish that the
set of these solutions (up to pure gauge transformations) form a phase space,
the \emph{solution phase space}, and that the tangent space of this phase space
includes the parametric variations. We then compute conserved charge variations
associated with the exact symmetries of the family of solutions, caused by
parametric variations. Integrating the charge variations over a path in the
solution phase space, we define the conserved charges. In particular, we
revisit "black hole entropy as a conserved charge" and the derivation of the
first law of black hole thermodynamics. We show that the solution phase space
setting enables us to define black hole entropy by an integration over any
compact, codminesion-2, smooth spacelike surface encircling the hole, as well
as to a natural generalization of Wald and Iyer-Wald analysis to cases
involving gauge fields.Comment: 35 pp, no figure