We have an automated deploy system at my company that has created multiple instances of the same application, one for each of our domains. In order to support routing to each domains, we deploy all of our instances as web apps under one root site, then create a one-to-one mapping between a top-level site with its domain configured and the appropriate web app. The site tree therefore looks like this:
In four of our six deployments, this setup works fine. However, for the remaining two we receive a 500 error if we browse the binding site, even though browsing the bound app works fine. Interestingly, changes to the configuration on the bound app do not take effect: we have turned off custom errors and enabled "Send Errors to Browser" in the debug properties, but we still receive the red-and-grey 500 error. Additionally, we have turned on failed request tracing at both the server and app levels (configured to listen for 500's), but the log is not populated with errors. Finally, we have taken the advice in this question, but the recommendations have not borne fruit.
What else could we be missing?
Is there a better way to configure our web apps for domains?