{"id":11102,"date":"2025-01-26T17:20:14","date_gmt":"2025-01-26T17:20:14","guid":{"rendered":"https:\/\/putridparrot.com\/blog\/?p=11102"},"modified":"2025-01-26T17:20:14","modified_gmt":"2025-01-26T17:20:14","slug":"azure-web-app-with-iis-running-asp-net-core-kestrel","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/azure-web-app-with-iis-running-asp-net-core-kestrel\/","title":{"rendered":"Azure web app with IIS running ASP.NET core\/Kestrel"},"content":{"rendered":"<p>When you deploy your ASP.NET core (.NET 8) to an Azure web app, you&#8217;ll have likely created the app to work with Kestrel (so you can deploy to pretty much any environment). But when you deploy as an Azure Web App, you&#8217;re essentially deploying to an IIS application.<\/p>\n<p>So we need for IIS to simply proxy across to our Kestrel app. We achieve this by adding a Web.config to the root of our published app. and we&#8217;ll have configuration such as below<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;configuration&gt;\r\n  &lt;location path=&quot;.&quot; inheritInChildApplications=&quot;false&quot;&gt;\r\n    &lt;system.webServer&gt;\r\n      &lt;handlers&gt;\r\n        &lt;add name=&quot;aspNetCore&quot; path=&quot;*&quot; verb=&quot;*&quot; modules=&quot;AspNetCoreModuleV2&quot; resourceType=&quot;Unspecified&quot; \/&gt;\r\n      &lt;\/handlers&gt;\r\n      &lt;aspNetCore processPath=&quot;.\\MyAspNetCoreApp.exe&quot; stdoutLogEnabled=&quot;false&quot; stdoutLogFile=&quot;\\\\?\\%home%\\LogFiles\\stdout&quot; hostingModel=&quot;inprocess&quot; \/&gt;\r\n    &lt;\/system.webServer&gt;\r\n  &lt;\/location&gt;\r\n&lt;\/configuration&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>When you deploy your ASP.NET core (.NET 8) to an Azure web app, you&#8217;ll have likely created the app to work with Kestrel (so you can deploy to pretty much any environment). But when you deploy as an Azure Web App, you&#8217;re essentially deploying to an IIS application. So we need for IIS to simply [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[200,96],"tags":[],"class_list":["post-11102","post","type-post","status-publish","format-standard","hentry","category-asp-net-core","category-azure-2"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/11102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=11102"}],"version-history":[{"count":2,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/11102\/revisions"}],"predecessor-version":[{"id":11247,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/11102\/revisions\/11247"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=11102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=11102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=11102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}