Is it possible to share the web.config across multiple projects in a solution?(ASP.NET)

I looks like it is possible, you can try following:

You can copy your web.config file to the root folder of your solution. Then create solution folder (which does not belong to any of your projects) and add your file there (via Add Existing Item popup menu item). Delete web configs from your web sites. After that you can select Add Existing Item from popup menu on your both web projects, select your web.config file from the solution root and click Add As Link. After that you will have links to your web config files instead of real ones in your solution.

alt text

On the other hand I’m not sure if sharing of the web.config files among different projects is a good idea, because usually web.config has some specific condifuration for each separate application.

Leave a Comment