I guess it depends on your definition of "very few things" but this list[1] of Unlawful vs. Lawful questions seems pretty long/wide ranging. And I know that the small business I worked for violated it on a regular basis. I actually had it sent out to each person who does interviewing (since the company didn't have a formal policy on training someone for interviews) so they knew what was/wasn't acceptable.
My understanding is that it is illegal to use any of those things to discriminate against someone for purposes of hiring. It's not technically illegal to ask the question, but if you do, and you don't hire the person, have fun in court trying to prove that you didn't hire them for some other, valid, reason. So don't ask them, because there's no upside in it for you.
That said, this is a bad idea because it would scare off plenty of people who aren't bluffing about their salary (like me). And there are already employers who will terminate you immediately if they discover you lied in your job application.