Perhaps you have nested Web.configs. If you use multiple applications from the same directory hierarchy, you can see this. For example, let's say you have IIS pointing to the root of some directory, but there is a folder with another application inside this directory, and you have vdir pointing to this application - you can really run into this problem, because ASP. Net will check first web.config in the root, and then web.config for the application that vdir points to.
source share