In this paper we provide some sufficient conditions for the differentiability of the value function in a class of infinite-horizon continuous—time models of convex optimization arising in economics. We dispense with an interioiity condition which is quite restrictive in constrained optimization and it is usually hard to check in applications. The differentiability of the value function is used to prove Bellman's equation as well as the existence and continuity of the optimal feedback policy. We also establish uniqueness of the vector of dual variables under some conditions that rule out existence of asset pricing bubbles