Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...could not connect to databasecould not connect to database
Previous
 
Next
New Post
11/26/2006 5:33 PM
 

I am working in win XP Pro SP2, IIS v.5.1, .NET Framework 2.0, Visual Studio 2005, SQL Svr 2005 EXPRESS, with the SQL Server Management Studio Express tool also installed.

I'm working on my DNN 4.3.6 install, and I'm having a connection string error. The message I'm getting is:

Error Installing DotNetNuke
Current Assembly Version: 04.03.06
ERROR: Could not connect to database specified in connectionString for SqlDataProvider

My connection strings are as follows:

  <connectionStrings>
    <!-- Connection String for SQL Server 2005 Express
    <add
      name="SiteSqlServer"
      connectionString="Data Source=MFIXED1\SQLEXPRESS;Initial Catalog=DNNtest3DB;Integrated Security=True;"
      providerName="System.Data.SqlClient" />
  -->
    <!-- Connection String for SQL Server 2000/2005   -->
    <add
      name="SiteSqlServer"
      connectionString="Server=(local);Database=DNNtest3DB;uid=DNN4User;pwd=DNN4password;"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
    <!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules 
    <add key="SiteSqlServer" value="Data Source=MFIXED1\SQLEXPRESS;Initial Catalog=DNNtest3DB;Integrated Security=True;"/>
 -->
    <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules    -->
    <add key="SiteSqlServer" value="Server=(local);Database=DNNtest3DB;uid=DNN4User;pwd=DNN4password;"/>

 

I was originally using the SQL Express string and Windows Integrated Security (which worked fine), but when I installed and opened the database in the SQL Server management Studio Express tool and created the user for the database, that didn't work anymore.  I want to use SQL authentication, not Windows Integrated Security.  That's where I'm having my problem.

I've never used the SQL Express Management tool before, though I followed the instructions in the Installation Guide to create my new SQL 2005 user and set the db_owner permissions.

I've also checked the security on the database files for the ASPNET user, and they have Full control.

What am I not seeing/missing?  I'm new to this security stuff, so please, if you can, give me explicit instructions on things that will likely seem very obvious to you.

All help is greatly appreciated -- Thanks!

Ellen

 

 
New Post
11/26/2006 10:32 PM
 
Ellen,

I have had more luck using an SQL Express string, but giving db_owner permissions to sa ,
and using an SQL Authentication with sa and yoursapassword.

Here is an example of what I have working on a local install:

replace * with < and & with >

  *connectionStrings&
    *!-- Connection String for SQL Server 2005 Express
    *add
      name="SiteSqlServer"
      connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=bringhome;uid=sa;pwd=mypassword;"
      providerName="System.Data.SqlClient" /&
--&
    *!-- Connection String for SQL Server 2000/2005 --&
    *add name="SiteSqlServer" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=bringhome;uid=sa;pwd=mypassword;" providerName="System.Data.SqlClient" /&
  */connectionStrings&

Thanks,
Travis
dnncassini.com
 
New Post
11/26/2006 10:47 PM
 

Ellen it looks like you forgot to uncomment (take the "<" and ">" off) your sql 2k5 "Express" strings.  Its looking for 2k5 server edition not Express.  instead of:

<connectionStrings>
   
<!-- Connection String for SQL Server 2005 Express
    <add
      name="SiteSqlServer"
      connectionString="Data Source=MFIXED1\SQLEXPRESS;Initial Catalog=DNNtest3DB;Integrated Security=True;"
      providerName="System.Data.SqlClient" />
  -->
    <!-- Connection String for SQL Server 2000/2005   -->
    <add
      name="SiteSqlServer"
      connectionString="Server=(local);Database=DNNtest3DB;uid=DNN4User;pwd=DNN4password;"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
   
<!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules 
    <add key="SiteSqlServer" value="Data Source=MFIXED1\SQLEXPRESS;Initial Catalog=DNNtest3DB;Integrated Security=True;"/>
 -->
    <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules    -->
    <add key="SiteSqlServer" value="Server=(local);Database=DNNtest3DB;uid=DNN4User;pwd=DNN4password;"/>

 

Change it to:

<connectionStrings>
   
<!-- Connection String for SQL Server 2005 Express -->
    <add
      name="SiteSqlServer"
      connectionString="Data Source=MFIXED1\SQLEXPRESS;Initial Catalog=DNNtest3DB;Integrated Security=True;"
      providerName="System.Data.SqlClient" />
  
    <!-- Connection String for SQL Server 2000/2005   
    <add
      name="SiteSqlServer"
      connectionString="Server=(local);Database=DNNtest3DB;uid=DNN4User;pwd=DNN4password;"
      providerName="System.Data.SqlClient" /> -->
  </connectionStrings>
  <appSettings>
   
<!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules -->
 
    <add key="SiteSqlServer" value="Data Source=MFIXED1\SQLEXPRESS;Initial Catalog=DNNtest3DB;Integrated Security=True;"/>
     <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules    
    <add key="SiteSqlServer" value="Server=(local);Database=DNNtest3DB;uid=DNN4User;pwd=DNN4password;"/> -->

 

Have fun,

 

 

-Mark


 
New Post
11/27/2006 9:14 AM
 

Thank you for replying, Travis and Mark --

I tried what you both suggested -- using the SLQ Express string instead, and I'm getting the same error, that it cannot connect to the database. 

I know I'm missing something simple here....  any ideas?

Thanks!

Ellen

 

 

 
New Post
11/28/2006 3:20 PM
 
Ellen --

With the database *previously created*, and with the proper permissions applied to connecting to that database, then the connection strings (either) should work. What is your setup? Which version of SQL are you using, and by what method did you create the database prior to looking at DNN?
EDIT: I see you are using SQL Server 2005 Express with its Management Console. I use the same. Google the following for an excellent tutorial page on creating the SQL 2005 Server Express management console with DotNetNuke. (I am using that page as the basis for a new project at dnncassini.com )

Google this: "codeproject.com +DotNetNuke +Cassini" (remove quotes)

Thanks,
Travis



Thanks,
Travis
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...could not connect to databasecould not connect to database


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out