Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 DotNetNuke Install

Author  Topic 

Xennith
Starting Member

5 Posts

Posted - 2006-08-31 : 19:02:07
I'm sort of a .net, php, dotnetnuke, sql newbie so bare with me if i'm leaving any important information out of this post...

I am trying to install DotNetNuke on my localhost and I have no idea how to get the installation to connect to my sql server.

I'm running Windows XP Professional (Service Pack 2)
I have IIS installed with the .net 1.1
i'm more than sure i installed 2.0 but i read somewhere the DNN works on both.

the error i'm getting is ...

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

I have Microsoft SQL Server 2005 Express.

Any thoughts?

Thanks in advance.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-08-31 : 19:15:58
Sounds like the connection string does not include the database, or maybe misspelled the name. Can you post your full connection string? (take out the password if it's in there)
Go to Top of Page

Xennith
Starting Member

5 Posts

Posted - 2006-08-31 : 19:19:01
Took me a second to figure out what you were talking about but I'm sure this is what you were asking for.

<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
<add
name="SiteSqlServer"
connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"
providerName="System.Data.SqlClient" />
-->
</connectionStrings>
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-08-31 : 19:49:03
I must admit I've never seen the AttachDBFilename=|DataDirectory|Database.mdf syntax used before, so I can't say it's invalid. But usually, a SQL Server connection string contains an entry like "Database=MyDatabase" or "Initial Catalog=MyDatabase". See if this syntax fixes the problem.
Go to Top of Page

Xennith
Starting Member

5 Posts

Posted - 2006-08-31 : 19:53:33
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: 'MyDatabase' is an unexpected token. Expecting white space. Line 25, position 105.

Source Error:

Line 23: <add
Line 24: name="SiteSqlServer"
Line 25: connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True; Database="MyDatabase"
Line 26: providerName="System.Data.SqlClient" />
Line 27: </connectionStrings>


Someone else told me to "unquote" the connection string on the version of SQL that I don't have. So I did. The connection string now looks like this...

<connectionStrings>
<!-- Connection String for SQL Server 2005 Express -->
<add
name="SiteSqlServer"
connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;

Database="MyDatabase"
providerName="System.Data.SqlClient" />
</connectionStrings>
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-08-31 : 20:03:11
Sorry, I should have said to change "MyDatabase" to whatever name your database is. If you're not sure, you may need to use the server browser in Visual Studio, or the SQL Server Express Manager or Management Studio to browse the server (localhost). The connection string should also be all on one line.
Go to Top of Page

Xennith
Starting Member

5 Posts

Posted - 2006-08-31 : 21:14:41
Still not working. I downloaded Visual Web Developer and looked at the code in color. I figured out how to acutally create the database. The database is in my documents folder and named dotnetnuke.mdf. This is what the connection string looks like now...

<connectionStrings>
<!-- Connection String for SQL Server 2005 Express -->
<add
name="SiteSqlServer"
connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;Database=C:\Documents and Settings\Warcraft\My Documents\dotnetnuke.mdf;"
providerName="System.Data.SqlClient" />
<!-- Connection String for SQL Server 2000/2005
<add
name="SiteSqlServer"
connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"
providerName="System.Data.SqlClient" />
-->
</connectionStrings>
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-09-01 : 13:35:56
You should not reference the file by name, only the database by the name that it's installed on your server. SQL Server/Express databases are NOT files, even if they are stored as files. The engine accesses them through a different mechanism.

If these suggestions don't work, you'll probably have to browse the DotNetNuke FAQ or support forums. I can only think that they've either got a really weird setup process, or perhaps something went wrong when you installed it.
Go to Top of Page

Xennith
Starting Member

5 Posts

Posted - 2006-09-01 : 13:50:40
Thank you for your help.

Last night at 4am I was able to configure it all correctly. The problem was that the version of DNN i was using was old and the connection string was out of sync with the database. I used Visual Web Developer and connected to the database with it. VWD showed me the correct connection string but for some reason left off "Password=password". So I edited the connection string there, saved the file, went to the application url and eureka!

Also I had to downgrade my version of DNN from 4.3 to 3.3 and now I have no SQL problems at all.

Thank you for you time, if it wasn't for your suggestion to use Visual Studio, I would have never found Visual Web Developer and found the corrent connetion string. The original syntax of the string as provided by DNN is nothing like SQL Server 2005 requires, as you suggested. "Database="Database.mdf". Sure enough.

Thanks again,
Xennith
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-09-01 : 14:55:05
Glad that worked for ya.
Go to Top of Page
   

- Advertisement -