2

I have downloaded the standard sitecore docker images and trying to replace web.config file by copying it into C:\SRC in the container. The new web.config file is being replaced. However i'm receiving 500 internal server error while browsing CD site.

Web.config do not have any major changes. Is there any other way to apply changes to web.config file?

PS. While change it via powershell, it works, i have many config changes to do it web.config file hence looking for other options

2
  • I think you already know how to change the web.config in Docker. This appears to be that you are making changes to the file and unable to validate what you modified is correct. Perhaps you can break down step by step what XDT transform you are applying to the web.config (modifying directly is silly) and then you will be able to narrow down what is breaking. – Michael West Feb 20 '20 at 13:15
  • it's funny. I actually went to the container, copied the content of the web.config, created a new web.config using the same content and added it to the attached volume.I still get the same error. – Masoud Mar 10 at 17:29
0

I had the same problem. The issue was the rewrite feature was not enabled in the IIS of the container and my new web.config had some rewrite rules in it. Also, I added my changes to web.config.xdt as transforms (as it is the recommended way) and rebuilt the container.

Some hint from Nick Wesselman https://twitter.com/techphoria414/status/1371887184886775816?s=20

Read more about adding transform: https://doc.sitecore.com/developers/100/developer-tools/en/applying-configuration-transforms.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.