I tend to ask "What do you do in life?" instead of "what do you do for a living?".
That way, people who would rather not talk about their job, or who are unemployed and don't want to say that, have an "out" to defer to their hobbies, interests, families, etc instead of directly needing to tell me: "my job situation is not something I discuss."
But I don't think it's /rude/ to ask it the way you did. And I agree with Dotty that, networking-wise, it was not too smart of him to respond to you in a snarky way.