The exception would be wanting to talk about something that happened in 1995 or 1996, like "He was living there from 1995 to 1997, when [some major event happened that makes his being there at that time significant]."
I see it the same as GG. But I want to add a little.
It seems unnatural to add for two years when you say He was living there. It's more natural to my ear to add just a when clause instead: He was living there when the disaster of 1996 occurred.
If you just say He was living there and stop, it will seem incomplete. Somebody will sa