The paper examines a general investment and consumption problem for a single agent who consumes and invests in a riskless asset and a risky one. The objective is to maximize the total expected discounted utility of consumption. Trading constraints, limited borrowing, and no bankruptcy are binding, and the optimization problem is formulated as a stochastic control problem with state and control constraints. It is shown that the value function is the unique smooth the associated Hamilton–Jacobi–Bellman equation and the optimal consumption and portfolios are provided in feedback form.