We have an ASP.NET Core web application that uses Angular JS (1.5) on the client, and the controllers are just used for returning data. During development, IIS Express is used on the developers' machines, and in other environments, IIS is used. This has some implications:
- attribute needs to be different between the devs' and the other environments: on devs' it looks like this:
<base href="/">
while on the others (running IIS) it looks like this (it includes the domain name):<base href="/DigitalRural/">
- Angular directives also need to include the domain name in the templateURL field in IIS while not in the local IIS Express machines.
So after deploying the app to some environment, we add the domain name to these locations.
Trying to solve this, I've tried to go the route of including the domain name during development time, so that both the base href attribute and the templateURL filed containing the domain name. But setting either the Launch URL or the App URL in IIS Express to this URL: http://localhost:60209/DigitalRural/ doesn't work. The browser can't find any file and the page is almost blank.
How do configure IIS Express to find the static files? They are all located under the wwwroot folder of the web app, which it finds if the URL is http://localhost:60209/, but can't find if the URL is http://localhost:60209/DigitalRural/
Thanks,
ashilon