Setting ASP.NET Core 2.0 favicon

前端 未结 4 841
感动是毒
感动是毒 2021-02-19 07:17

I\'m trying to add and set favicon.ico.

When I saw a initial project that Visual Studio 2017 make automatically, the favicon.ico file is just in the w

4条回答
  •  面向向阳花
    2021-02-19 07:41

    Just a headsup for anyone struggling with this issue. If you're serving up a spa from .net core 2 (angular, react, other) sometimes the spa will look under the spa's static file's folder. I struggled with for awhile and found that the only way i could get the favicon to show up with my angular app was to put the favicon and site.webmanifest in my app/assets folder. Worked without any modification after that. There are some suggestions out there to modify the content response types but didn't have to do that as long as the files were in the right folder. Hopefully this helps someone else.

提交回复
热议问题