My web application is typically located in a subdirectory of the root in IIS. Suppose the subdirectory is \"app\"
When I try to debug it in Visual Studio, the path is a
I found the answer here: https://stackoverflow.com/a/4733387/88409 Different question, but same answer.
Basically, one must create a child application, not just a child virtual directory.
It seems to require both application entries (i.e. it requires a root application (even if it's physically an empty dummy directory) as well as the child application). If I omit the first application entry at the root, then it gets error 500.19 "The requested page cannot be accessed because the related configuration data for the page is invalid." With both application entries, however, it works without any issues.
As far as I can tell, there is no way to produce the above settings in Visual Studio, so it must be edited manually in application.config. These settings are therefore completely disassociated with the web application project files themselves, which isn't good, IMO.