I've had dragon attacks inside Solitude and Whiterun but only when I've fast travelled directly to them. The dragon in Solitude was taken down by the legion in the Imperial compound.
For the one in Whiterun which kept landing on the building roofs where I couldn't bash it, I left the town through the main gate and it then appeared outside. So you can force the dragons out of the city if you back out of the gate and fight them there instead.
3 attacks in riverwood already. 2 blood dragons (easy) but 1 elder dragon whipped out half of the village (3 guards, that elf archer trainer, blackmisth and his wife) by the time I killed it. It was a massacre.
I'm envious of all of you who have seen the closed city dragon attacks, played 3 different characters and many many hours of the game and I've yet to see it happen. Guess it must be fast travel related as I almost never use FT and these types of attacks (and random dragons in general) are fairly rare in my experience.