The generic Fréchet and/or Gateaux differentiability of a continuous convex function on an open convex subset of a Banach space is well studied and has important theoretical implications. An example of Rainwater [Yet more on the differentiability of convex functions. Proc Amer Math Soc. 1988;103(3):773–778] shows that similar results are not true when the openness of the domain is not ensured, but such properties can be obtained if the respective convex function is assumed to be locally Lipschitz, as shown by Verona [More on the differentiability of convex functions. Proc Amer Math Soc. 1988;103(1):137–140]; Rainwater [Yet more on the differentiability of convex functions. Proc Amer Math Soc. 1988;103(3):773–778]; Noll [Generic Gâteaux-differentiability of convex functions on small sets. J Math Anal Appl. 1990;147(2):531–544] and others. It is our aim to extend such results for convex functions defined on (not necessarily open) convex subsets of locally convex spaces. In the same framework we extend Gale's duality theorem (1967), as well as a result of H. Ergin & T. Sarver on the unique dual representation of a convex function (2010). Moreover, a detailed study of the Rainwater example is done.