{"id":155,"date":"2022-02-02T16:38:40","date_gmt":"2022-02-02T16:38:40","guid":{"rendered":"http:\/\/gkokot.com\/?p=155"},"modified":"2022-02-05T11:26:57","modified_gmt":"2022-02-05T11:26:57","slug":"bootstrap-icons-and-azure-app-services","status":"publish","type":"post","link":"https:\/\/gkokot.com\/?p=155","title":{"rendered":"Bootstrap icons and Azure App Services"},"content":{"rendered":"\n<p>With latest version of Bootstrap (popular front-end open source toolkit) we can use also bootstrap-icons, official open source SVG icon library for Bootstrap.<\/p>\n\n\n\n<p>I updated my website built with Asp.net and bootstrap to the latest versions of all components<\/p>\n\n\n\n<p>( .Net &gt;4.8, Bootstrap &gt; 5.1 ) and implemented Bootstrap-icons v1.7.<\/p>\n\n\n\n<p>All worked well on development environment (local computer with Visual Studio 2022), website was displayed correctly in browser and all icons (using as font) also.<\/p>\n\n\n\n<p>But once published in Azure as App Service, icons were not displayed (replaced by empty rectangle)<\/p>\n\n\n\n<p>Two issues have been detected during my investigations:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Using files with extensions on Azure App Services (IIS): &nbsp;.woof and .woff2 (used by bootstrap-icons)<\/li><li>Using stylesheet files from bootstrap v5.1 in Asp.net MVC project on Azure App Services (IIS).<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"solution-in-azure\">Solution in Azure:<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Install extension in App Service: \u201cEnable Static Web Fonts\u201d<br><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"929\" height=\"505\" src=\"https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/Azure-extension-on-app.png\" alt=\"\" class=\"wp-image-156\" srcset=\"https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/Azure-extension-on-app.png 929w, https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/Azure-extension-on-app-300x163.png 300w, https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/Azure-extension-on-app-768x417.png 768w\" sizes=\"(max-width: 929px) 100vw, 929px\" \/><\/figure>\n\n\n\n<p>2. In website project, replaces related .css files from BundledConfig.cs to header of file _Layout.cshtml.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"895\" height=\"168\" src=\"https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/File-BundledConfig.cs_.png\" alt=\"\" class=\"wp-image-157\" srcset=\"https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/File-BundledConfig.cs_.png 895w, https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/File-BundledConfig.cs_-300x56.png 300w, https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/File-BundledConfig.cs_-768x144.png 768w\" sizes=\"(max-width: 895px) 100vw, 895px\" \/><figcaption>From BundledConfig.cs <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"627\" height=\"112\" src=\"https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/File-_Layout.cshtml.png\" alt=\"\" class=\"wp-image-158\" srcset=\"https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/File-_Layout.cshtml.png 627w, https:\/\/gkokot.com\/wp-content\/uploads\/2022\/02\/File-_Layout.cshtml-300x54.png 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><figcaption>To _Layout.cshtml<\/figcaption><\/figure>\n\n\n\n<p>Now Azure App Service working well and display correctly all components.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.forest59.com\">https:\/\/www.forest59.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With latest version of Bootstrap (popular front-end open source toolkit) we can use also bootstrap-icons,<a class=\"readmore btn btn-info\" href=\"https:\/\/gkokot.com\/?p=155\" rel=\"nofollow\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":161,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,11,3,5],"tags":[13,16,12,15,14],"class_list":["post-155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net","category-azure","category-c","category-visual-studio","tag-aps-net","tag-azure","tag-bootstrap","tag-bootstrap-icons","tag-c"],"_links":{"self":[{"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/posts\/155"}],"collection":[{"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=155"}],"version-history":[{"count":3,"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/posts\/155\/revisions"}],"predecessor-version":[{"id":221,"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/posts\/155\/revisions\/221"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/media\/161"}],"wp:attachment":[{"href":"https:\/\/gkokot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}