Favicon Not Showing

后端 未结 6 853
夕颜
夕颜 2021-01-17 11:32

I have a favicon in my ASP.NET project that\'s not showing up. I have a masterpage located at ~/MasterPages/MasterPage.master that holds the favicon. My markup is as follows

相关标签:
6条回答
  • 2021-01-17 11:44

    Right click on the solution and go to Properties. Under Application > Resources change the default icon to your chosen one.

    0 讨论(0)
  • 2021-01-17 11:45

    Try to leave the type away, clear the browser cache and go to the favicon address manually and add some parameters to it. That should fix it. Maybe you could tell me your website address, then I will look, if it shows up here.

    0 讨论(0)
  • 2021-01-17 11:46

    In a .NET Core app (MVC template) try moving the favicon.ico file to the lib folder instead of the wwwroot folder.

    0 讨论(0)
  • 2021-01-17 11:46

    I finally solved this problem by renaming favicon.ico to myicon.ico, and reference it in the head <link rel="icon" href="~/myicon.ico" type="image/x-icon" />

    0 讨论(0)
  • 2021-01-17 11:56

    Load up fiddler http://www.fiddler2.com/fiddler2/ and look for the request from the browser for it - that will show you if its successful, a cache issue, etc.

    0 讨论(0)
  • 2021-01-17 11:57

    Try placing a ~ and set the link elements to runat=server

    <link runat="server" rel="shortcut icon" href="~/favicon.ico" type="image/x-icon" />
    <link runat="server" rel="icon" href="~/favicon.ico" type="image/ico" />
    

    This also needs to be done in the <head> section of the page.

    0 讨论(0)
提交回复
热议问题