I have an applcation which includes it's own web.config. When I place the applcation in the website root (e.g. inetpub/wwwroot) everything works fine. If I move the applcation to a virtual directory as an application, I get the message "[FileNotFoundException: Could not find file 'C:\inetpub\wwwroot\web.config'." i.e. it seems to still be looking for the config file in the web root. There is no config file in the web root but there is one in the applcation root.
I am using IIS8 and Windows 2012. Feature delegation seems to be OK and there is nothing in the web.config file telling it to look in a parent web.config file.
So localhost works but localhost/appdir doesn't.
Any suggestions?