Here's what I would do, next time he does his business, spray him with some water. It won't happen immediately, but with a little dedication your dog will get the message that doing his business in front of the door is bad. He will then try to go somewhere else. If that happens you don't need to give him praise, he'll figure out that other places are good , but by the door is not. Also, if he is an older dog it will take a few more repititions, but he will get the message.