{"id":179,"date":"2021-03-29T20:42:50","date_gmt":"2021-03-29T20:42:50","guid":{"rendered":"http:\/\/blog.bp8.pl\/?p=179"},"modified":"2021-03-29T21:09:33","modified_gmt":"2021-03-29T21:09:33","slug":"adding-mimetype-in-azure-app-service","status":"publish","type":"post","link":"https:\/\/blog.bp8.pl\/index.php\/2021\/03\/29\/adding-mimetype-in-azure-app-service\/","title":{"rendered":"Adding mimeType in Azure App Service"},"content":{"rendered":"\nWhen running web apps using Azures App Service Plan you may occasionally run into a problem where files or resources you have uploaded are not found even though they are where they should be. This usually results in a 404 error.\nBasic example of web.config file for supporting mimeType&#8217;s\n\n\n\n<pre><code>\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;<br \/>&lt;configuration&gt;<br \/>&lt;system.web&gt;<br \/>&lt;\/system.web&gt;<br \/>&lt;system.webServer&gt;<br \/>&lt;staticContent&gt;<br \/>&lt;mimeMap fileExtension=\".svg\" mimeType=\"image\/svg+xml\" \/&gt;<br \/>&lt;mimeMap fileExtension=\".mp4\" mimeType=\"video\/mp4\" \/&gt;<br \/>&lt;mimeMap fileExtension=\".webm\" mimeType=\"video\/webm\" \/&gt;<br \/>&lt;mimeMap fileExtension=\".ogm\" mimeType=\"video\/ogv\" \/&gt;<br \/>&lt;mimeMap fileExtension=\".woff\" mimeType=\"application\/x-font-woff\" \/&gt; <br \/>&lt;mimeMap fileExtension=\".woff2\" mimeType=\"application\/x-font-woff2\" \/&gt; <br \/>&lt;mimeMap fileExtension=\".js.min\" mimeType=\"text\/javascript\" \/&gt; <br \/>&lt;mimeMap fileExtension=\".json\" mimeType=\"application\/json\" \/&gt; <br \/>&lt;mimeMap fileExtension=\".ico\" mimeType=\"image\/x-icon\" \/&gt; <br \/>&lt;\/staticContent&gt;<br \/>&lt;\/system.webServer&gt;<br \/>&lt;\/configuration&gt;\n<\/code>\n<\/pre>\n\n","protected":false},"excerpt":{"rendered":"<p>When running web apps using Azures App Service Plan you may occasionally run into a problem where files or resources you have uploaded are not found even though they are where they should be. This usually results in a 404 error. Basic example of web.config file for supporting mimeType&#8217;s &lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;\/system.web&gt;&lt;system.webServer&gt;&lt;staticContent&gt;&lt;mimeMap fileExtension=&#8221;.svg&#8221; mimeType=&#8221;image\/svg+xml&#8221; \/&gt;&lt;mimeMap [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[84,83,85,86],"_links":{"self":[{"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/posts\/179"}],"collection":[{"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/comments?post=179"}],"version-history":[{"count":5,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":188,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/posts\/179\/revisions\/188"}],"wp:attachment":[{"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/media?parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/categories?post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/tags?post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}