There is a difference between the figurative meaning of à and the spatial
meaning of dans.
Example
Il est dans le bureau.*
He is in the office.
Il est au bureau.
He is in the office.
* it is possible to say so, however, the meaning is more concentrated on the space than on the meaning of being at a working place.
Examples
a) Il est en prison.
He is in prison.
not: b) Il est dans la prison.
Il habite en ville.
He lives in the city.
but: Il habite dans la ville dont je t'ai parlée. Il habite dans la ville touchée par la catastrophe.
with a) not the space of the prison is stressed, but the point that he cannot get out.
with b) only the space of the prison is meant.
There are also casese, when au
and dans
and en can be used:
Examples
L' église se trouve dans le centre ville.
L' église se trouve au centre ville.
L' église se trouve en centre ville.
The church is in the center of the town.
For fans of statistics:
se trouve dans le centre ville = 560 hits in google auswirft, der Ausdruck
se trouve au centre ville = 1243 hits and
se trouve en centre ville = 2233 hits.