well maybe i missed the point here completely. but maybe this helps:
I had also the error with cannot find the database.mdf file.
I wanted to use the SQL2005 Express (or good ol' MSDE) and not some database.mdf file
Download SQL Express from microsoft. here
i made DNN 4.0.2 running this way:
In the original file we have two connection strings the database connection to the mdf (default enabled) and the one i want to use with the SQL Express.(disabled) The most simple way i found to use a SQL service was to remove the blue parts and place/remove the comment signs. Inside the web.config: (renamed release.config)
<connectionStrings>
<!-- Connection String for SQL Server 2005 Express -->
<add
name="SiteSqlServer"
connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"
providerName="System.Data.SqlClient" />
<!-- Connection String for SQL Server 2000/2005 *PLACE END COMMENT SIGN HERE*
<add
name="SiteSqlServer"
connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"
providerName="System.Data.SqlClient" />
--> *AND REMOVE THE ONE HERE*
</connectionStrings>
<appSettings>
<!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules -->
<add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>
<!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules *PLACE END COMMENT SIGN HERE*
<add key="SiteSqlServer" value="Server=(local);Database=DotNetNuke;uid=;pwd=;"/>
--> *AND REMOVE THE ONE HERE*
<add key="InstallTemplate" value="DotNetNuke.install.config" />
<!-- Alternative Install Templates (included in package)
<add key="InstallTemplate" value="Club.install.config" />
<add key="InstallTemplate" value="Personal.install.config" />
<add key="InstallTemplate" value="SmallBusiness.install.config" />
-->
<add key="AutoUpgrade" value="true" />
<add key="InstallMemberRole" value="true" />
<add key="ShowMissingKeys" value="false" />
<add key="EnableWebFarmSupport" value="false" />
<add key="EnableCachePersistence" value="false"/>
</appSettings>
Comment is from here <!-- to --> this
After changing everything i just got an error that the install could not find the SiteUrl.config. i had to copy it manually from the \config folder to the website root. It works fine and i did not get the error some people after installation. (some people have a site up and running, but no contents will be displayed. (red error messages inside the modules about links.)
I hope that this will help some people a little further.