7

I am currently running my web app in Azure's Web App for Containers, having migrated from their standard Web App service. Prior to the transition I used a web.config file to rewrite my custom domain's url to enforce a "www" in the front. It was as simple as a few xml lines in the web.config file and then placing the web.config in the site/wwwroot directory of my app. However, doing the same while running my app in a docker container does not yield the same result. I have tried placing my web.config file in site/wwwroot, site/, and / without any success at rewriting my URL. Where is the web.config file supposed to go in my case?

javajared
  • 181
  • 2
  • 9

1 Answers1

0

When using containers in App Service, the application should be packaged inside the container. That applies for both Windows or Linux containers.

Here you have a quickstart for Windows Containers on Azure App Service: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-get-started-windows-container

Thanks,

Joaquín

Joaquín Vano
  • 414
  • 1
  • 3
  • 5
  • The problem is that, when running as container, you end up behind a reverse proxy it seems. So it does not seem to matter what you enable on your container. Also using RequireHttps attributes and so forth will result in infinite loops. In a normal kubernetes environment you can just configure this on your ingress proxy, but im not currently not sure (might be missing something) how to achieve the same effect in an app service. – Base Sep 15 '19 at 11:59