WD40 will work okay if the chain is warm, so go ride for 15 minutes first. diesel or kerosine (sp?) will work the best. It really helps to have a warm chain and a soft brush to clean the chain up with.
I usually get the chain warm, then clean the chain with diesel and let it dry for a few minutes afterwards. Then I spray chain wax on and let it dry. I try to let it sit overnight before I ride it again to let the chain wax dry a little so it won't sling off and make too much of a mess.