We have an ASP.NET MVC website that runs happily at eg. www.test.com.
We would like to shunt it to a subfolder on www.test.com/xyz. Anyone visiting the root should get nothing - we are quite happy if the root location 404s or is blank or just shows a holding page index.htm. Basically we want to crudely obfuscate the site's new xyz location.
We don't have access to IIS on the hosting so would like to do this all just by moving the files around (and perhaps editing web.config).
From research done here on similar questions it seems that location of web.config is crucial. Ours is the version built by Visual Studio when generating a new MVC application so 140+ lines of configuration which we don't normally mess with too much and haven't had to understand in depth.
What we have tried:
- web.config in the subfolder only
- web.config in the root only
Neither of these above attempts work. e.g. if the web.config is in the root only we get an error:
Could not load file or assembly 'Microsoft.AspNet.TelemetryCorrelation' or one of its dependencies. The system cannot find the file specified.
at www.test.com, and a 500 error at www.test.com/xyz
I sense we need to split web.config and have some of it in the root (the bare essentials?) and the rest in the subfolder, but I am far from sure of the syntax.