Domanda

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?

Nessuna soluzione corretta

Altri suggerimenti

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>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top