Data Access Layer Guidance Package Tip for ASP.NET Websites and Web Application Projects
by David Hayden ( Microsoft MVP C# ), Filed: Web Service Software Factory
I received a few email messages regarding my Data Access Guidance Package Screencast on PnPGuidance concerning specifying an ASP.NET Website or Web Application Project as the host. It appears the ConnectionString is correctly saved in the web.config, but the recipes don't correctly pick up a ConnectionString in a web.config file. Note - Just a caution about Web Application Projects in general using the Web Service Software Factory, I have not been able to get them to work in the past with some recipes and I was told they are unsupported in the Dec 2006 release ( v2.0 ).
If you remember in the screencast, I had picked a class library ( business module per the Web Client Software Factory ) as the host and an App.config was created in the class library with the appropriate ConnectionString. I know for a fact this works and choosing the data access layer class project as the host is how I have always used it.
Tip: My recommendation when using the Data Access Guidance Package in your ASP.NET Website and Web Application Projects is to choose a class library as a host, preferably the class library you are using as the data access layer.
You only need the App.config in the class library when using the recipes. When done, you certainly have the option of deleting it, but it is not necessary to do so. Here is the example I show in the screencast with the ConnectionString in the App.config of my business module:

Hope this helps.
Source: David Hayden ( Microsoft MVP C# )
Filed: Web Service Software Factory