Many clients want to build 1-million app for 1 thousand. So at some stage in the process you have to ask him about the budget he had in mind (if he does not mention it immediately).
Now, how soon do you ask this?
As of recently, I started ask for the budget pretty soon. Many times in my first email to a client. In that email I ask him questions about project features, ask for wireframes and documents, but I also let him know that my previous similar project cost XY dollars and does he have the budget which can cover such costs. I also let him know that costs may be lower, but also higher after we review all the specs.
Do you think this is a good approach? For me it's good since if he does not reply back, I know that he is the client from my first sentence. In any case, working this way I do not waist my time on bad or irrational clients.