Question

I have this small problem men deploying my asp.net mvc project to a web server running on IIS 8. May seem like a minor, but my favicon is not displayed in the page tab. It works when running locally on Visual Studio development server.

Another thing I'm curious about is the fact that the icon is reciding in my root-folder, but I cannot seem to find any references to it in any of my cshtml-files. How come it works locally? (And, of course, not on server when published)

Was it helpful?

Solution

Solved by adding the following line:

<link rel="icon" type="image/x-icon" href="@Url.Content("~/favicon.ico")">

No idea why it works locally without this line though :/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top