Frage

My MVC application can be accessed using the following three methods:

http://domain-name/app - Images and JS files are not loading

http://server-name/app - All content files are loading perfectly

http://ip-address/app - Images and JS files are not loading

Images and JS files are not loading when accessed through domain name and ip-address. All content files are loading perfectly using server name. Any thoughts on this?

Keine korrekte Lösung

Andere Tipps

Are you using absolute paths when referencing your images and js files in your views or layouts?

Using relative paths should resolve this issue:

<script src="~/Scripts/Mycript.js"></script>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top