Regarding web.config files ...
Web.config is an XML document containing configuration options for a web application. It is located in the root directory of the web application, so for SharePoint it is usually located in the folder C: \ Inetpub \ wwwroot \ wss \ VirtualDirectories \ SharePoint80, where SharePoint80 is the name of your web application.
Manually making changes to the web.config file is safe if you save the tags and sections in the correct order. Check out this article .
It is also possible to make changes to it programmatically, this post should show you how.
Hope this helps.
source share