  We study the cancellation of U(1) anomalies in Type I and Type IIB D=4, N=1
string vacua. We first consider the case of compact toroidal $Z_N$ Type IIB
orientifolds and then proceed to the non-compact case of Type IIB D3 branes at
orbifold and orientifold singularities. Unlike the case of the heterotic string
we find that for each given vacuum one has generically more than one U(1) with
non-vanishing triangle anomalies. There is a generalized Green-Schwarz
mechanism by which these anomalies are cancelled. This involves only the
Ramond-Ramond scalars coming from the twisted closed string spectrum but not
those coming from the untwisted sector. Associated to the anomalous U(1)'s
there are field-dependent Fayet-Illiopoulos terms whose mass scale is fixed by
undetermined vev's of the NS-NS partners of the relevant twisted RR fields.
Thus, unlike what happens in heterotic vacua, the masses of the anomalous
U(1)'s gauge bosons may be arbitrarily light. In the case of D3 branes at
singularities, appropriate factorization of the U(1)'s constrains the
Chan-Paton matrices beyond the restrictions from cancellation of non-abelian
anomalies. These conditions can be translated to constraints on the T-dual Type
IIB brane box configurations. We also construct a new large family of N=1
chiral gauge field theories from D3 branes at orientifold singularities, and
check its non-abelian and U(1) anomalies cancel.
