Thanks for your reply Michael (and thanks for all your tutorials).
I did as you suggested. I created a connection strings section in the web.config file located in the WAP project for my DNN module, and duplicated the "Site Sql Server" section from the web.config in the DNN website I'm using for development. VS 2008 still does not provide that option in the drop down list for the connection property in any Linq to SQL data context I create.
Actually, I think I need to step back and give more details about my setup and what I have learned so far.
I am starting off with the project created by the BiteTheBullet starter kit. I have the install version of DNN running from c:\Dnn using the local IIS. I'm running this development DNN environment utilizing the database.mdf file located in c:\Dnn\App_Data running as a user instance on my local SQLExpress.
I have a VS2008 solution, created using the BiteTheBullet starter kit whose files are located in c:\Dnn\DesktopModules\MyWapModule\. The MyWapModule project has a reference to DotNetNuke.dll (located in c:\Dnn\bin) and builds to c:\Dnn\bin.
If I compile the basic module provided by the BiteTheBullet starter kit project, and install the module in my DNN site via the usual method, all is well.
Now I want to replace the DAL with one that utilizes Linq to Sql. First I need to create a DataContex (.dbml file). In order to do so, I need to drag tables from the Server Explorer to the Linq to SQL design surface (I would prefer not to use SqlMetal to do it) -- but the MyWapMoodule project does not have a data connection to the database my DNN installation is using. I can't directly attach the same database file as DNN is using from the MyWapModule project because the ASPNET process running DNN already has a hold of it.
I CAN use the SSEUtil tool to find the name of the user instance that DNN's ASPNET process is using (e.g., \\.\pipe\xxxxxx-xxxx-xx\tsql\query) and then create a data connection to it. I can then drag tables from this connection onto the design surface in order to create Linq To Sql DataContext classes, however the connection string property in the designer is then specific to the user instance that the ASPNET process is using to run my development DNN environment -- this connection string will not work for the DataContext classes when they are moved to production.
I can also set the DataContext's connection string property to "none." If I do this, when I instantiate an instance of the DataContext in code, I can do so using the constructor overload that calls for a connection string and pass in the value returned by DotNetNuke.Common.Utilities.Config.GetConnectionString("SiteSqlServer"). This should work properly in both development and production (haven't tested moving the module from development to production yet).
What I'm wondering about though, is if there is a way to make the MyWapModule VS project understand that it is running as a subfolder (not a separate app) of the DNN installation so that the project can "see" DNN's web.config file and allow the DataContext designer to provide the option to connect using the "SiteSqlServer" connection defined there. As I said, that option did not appear in the DataContext designer's connection property drop down box -- even after i added a "SiteSqlServer" key to a web.config that is local to the project folder.
Thanks to anyone who's taken the time to read through this. And thanks in advance for any help.
Michael Bradley