I've painted rails with oil based, water based and just about anything in between and had good luck with just about everything.
The only thing I wouldn't be doing though is cleaning your railheads with sand paper no matter how fine. You put tiny scratches in the railhead and that is what...