Web.config files for SharePoint

sharepointweb.config

What's the different between web.config files under the project and the one under *C:\inetpub\wwwroot\wss\VirtualDirectories* in SharePoint Project.

Is it the same ?

Let's say if I want to use an assembly, where should I put it ?

Thanks.

Best Answer

Anything put in the web.config of C:\inetpub\wwwroot\wss\VirtualDirectories is connected to the SharePoint web and that web alone. The web.config in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ (and the hive folders) are connected to either the Layout templates or the services that are running sharepoint.

If you want to register an assembly put it in the web.config of C:\inetpub\wwwroot\wss\VirtualDirectories