I'm hoping someone can help me with this hair puller... I have successfully installed DNN on my laptop running windows 7 pro and SQL Express 2008. I then set up another local site and downloaded my live DNN site in order to test some planned changes. Whatever I have tried, I cannot connect to the database when browsing the local host site - I get the error: Upgrade Error: ERROR: Could not connect to database specified in connectionString for SqlDataProvider. Here is what I have done:
I restored the database to the app_data folder in the root of the site and configured the connection in web confog as follows:
<add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;AttachDbFilename=|DataDirectory|nfbc_new.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
<add key="SiteSqlServer" value="Data Source=.\SQLExpress;AttachDbFilename=|DataDirectory|nfbc_new.mdf;Integrated Security=True;User Instance=True" />
I attached the database and changed the portal alias table to point to local host.
I set up a seperate app pool for the site.
After this did not work, I deleted the db, restored it again directly in SSMS, updated the portal alias table and changed web confid as follows:
<add name="SiteSqlServer" connectionString="Server=BRIANS-LAPTOP\SQLEXPRESS;Database=db name;uid=****;pwd=****;" providerName="System.Data.SqlClient" />
value="Server=BRIANS-LAPTOP\SQLEXPRESS;Database=db name;uid=****;pwd=****;"/>
I Googled the problem and followed the advice I found including in this forum, but to no avail.
In both cases I compared file access permissions between the working DNN site and the non working site and made changes where needed. I also looked at db users and access, and compared access, but this is where I think my problem lies. I don't quite understand how the working site successfully connects to it's db, so it is difficult to figure out. I'm about to chuck the whole thing and install SQL server 2005, but I really don't want it on my laptop. Any help with this would be greatly appreciated.