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 ...Connection String Error for SQL Server 2005Connection String Error for SQL Server 2005
Previous
 
Next
New Post
9/7/2007 3:14 PM
 

Hi everyone! 

I'm trying to install DNN 04.05.05 on my development machine, but I keep getting the

ERROR: Could not connect to database specified in connectionString for SqlDataProvider

I changed the release.config file to web.config and made my connection string:

<

add

 

name="SiteSqlServer"

 

connectionString="Server=myServerName;Database=myDBName;Integrated Security=True;"

 providerName="System.Data.SqlClient"/>

I've tried Data Source=myServerName;Initial Catalog=myDBName;Integrated Security=True;

I've tried added trusted_connection=yes.

DNN doesn't like it.  Does DNN not work with SQL Server 2005?  Does it only work with Express?  I've search millions of posts and everyone is talking about Express.  My SQL Server is setup to only use windows auth.  I've double and triple checked the spelling of myServerName and myDBName and they match.  I have no ideas!

Please help!    Thanks!

 

 
New Post
9/7/2007 9:58 PM
 

Hi Shiland,

I am not an expert with SQL Server, but I do know that DNN does work with SQL Server 2005 since I use it with several DNN installs.  

Make sure you are using the SQL Server 2000/2005 settings in the web.config instead of the Express settings.  The default in the web.config is for Express, and the SQL Server 2000/2005 areas are commented out.  Also make sure the connection string is added in both places on the web.config.... connection string and also in appSettings just below connection strings.

If on a test machine, with SQL Server on the same machine as the portal, I think you should be able to use "server=(local);Database=myDBName;Integrated Security=True;"

If SQL is on a remote server, it depends on how the server is setup, but possibly something like "User ID=XXXXX;Password=ZZZZZ;Initial Catalog=myDBName;Data Source=myDBName.IPaddress;"  (IPaddress or host domain name).

I wish I could be more specific with help.
Good luck.


Terence
TMMworld Dot Net Services
View Terence Maney's profile on LinkedIn
 
New Post
9/8/2007 3:07 AM
 

Shiland,

I've had lots of problem installing DNN. One thing I noticed is that in the web.config I left it as it is. Don't fill in any information. Just make sure that the folder security has ASPNET has Modify permission. It worked for me.

david lam

 

 
New Post
9/8/2007 5:34 PM
 

Shiland:

David is close to the answer you need but he does not say exactly why.  The thing is that with SQL 2005 there is a new data access model (available to ASP.Net 2.0 and ADO.Net 2.0) where you don't have to specify the connection string like in previous versions of SQL Server.  With DNN 4.x and SQL Server Express 2005, you don't have to change or even specify the initial connection string.  The basic installation of DNN assumes that the database file is in the directory App_Data under the root of the DNN install.  Also, in case you are familiar with SQL Server 2000, you don't have to attach the database file for DNN (or actually ASP.Net 2.0) to use it.  This is also a new feature of 2005 that confuses a lot of people familiar with SQL 2000.  2005 now uses what is called a user instance, where the database can be easily distributed (a la XCopy) and the application can start using it right away as long as the SQL 2005 engine has been previously installed. 

By the way, you will not be able to see or manage the default database with SQL Server Management Studio Express, there is a way to do it, but you would need to attach the database using a process similar to what is done with SQL 2000 and then you will need to change the connect string.  There is a detailed article you can find in this forum with the step by step process to do that.

I don't know what went wrong with your initial install, the new installation process is pretty flawless.  If you are still having problems I would recommend that you put the connect string  back to the default.  That is, unless you use SQL 2000, a database on a separate server, or 2005 on the same server using a regular database instance (known as a "named instance").

For more info on user instances in 2005 check this article: http://msdn2.microsoft.com/en-us/library/bb264564.aspx

Carlos

 
New Post
9/9/2007 10:32 PM
 

Carlos,

Thank you for the explanation regarding SQL 2005 with DNN.   I started out with SQL Server 2000, and my skills were limited, so I could not grasp much of what was changing with the transition to 2005.   Your explanation here is very clear and most hepful!

Terence


Terence
TMMworld Dot Net Services
View Terence Maney's profile on LinkedIn
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Connection String Error for SQL Server 2005Connection String Error for SQL Server 2005


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