Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel.Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

updating web.config sharepoint-74updating web.config sharepoint-75

I have not tested this in detail, so experiment a little to find out.

Once you execute this code (in a feature receiver or a test console app) you’ll notice how the changes are (sometimes slowly) being propagated across the farm.

After a while (could be 2min – a timer job does the job) you’ll find the new configuration settings across your web apps.

If not, you probably get an exception saying some node is missing, read it and interpret it clearly.

Type: you will need to use Ensure Child Node most of the time.

Value: the actual XML to insert into the web.config. I haven’t tested it through, but this tends to lean towards the fact that you could add an entire tree at once.

This is recommended only in Development environments and you should not fiddle with the web.config in production environments.

The purpose of enabling and custom errors and complete stack trace is only for easier troubleshooting and developers are recommended to revert the changes once development is completed.

By commenting, you are accepting the IBM commenting guidelines and the DISQUS terms of service.

As most of you (should) know, Share Point farms can have more than 1 WFE (web front end) server, each with its instance of the web applications available in the farm.

After that, you need to apply the web config modifications and update the web application to save the new collection of changes. This seem silly at the time, but makes it possible for Share Point to find the node for deletion afterwards.