Hmmm.
My dog lives IN the house.
When she first came, she'd pee and poo all over the place. But each
time she did so, my brother would bring her to the spot where she
did her business, point to it and say sternly that it's wrong. Then
he'd bring her to the car porch or something dunno what he did
next...
Then soon our doggie learnt that it's wrong to pee and poo in the
house, so she gradually did all her business in the porch.
Occasionally now if she's unable to control it (in the event the
door is closed), she'd do it in the house but when she sees us
she'll pull back her ears and give a sheepish look, showing that
she knows it's wrong.