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
If your favicon.ico file is in wwwroot folder and if you are still getting 404 error when browser try to get favicon.ico, make sure you have app.UseStaticFiles();
in your Startup.cs -> public void Configure(IApplicationBuilder app, IHostingEnvironment env)
.
Please read Static files in ASP.NET Core for detail.
If you add favicon.ico in wwwroot and not in any subfolder, you don't need to add the tag in your html or cshtml.