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 ...All this needs to be explained in user guide / documentation!All this needs to be explained in user guide / documentation!
Previous
 
Next
New Post
10/16/2006 11:53 PM
 
Ok, now I can safely say I've done my share of reading this forum, two DNN books, and experimental work. After about 40 hours worth of research I still have questions and I know there are hundreds, if not thousands, of people out there that feel frustrated and are not getting much help with DNN installation issues - specifically, database connection problems. Why aren't there clear installation instructions (given two books published by Mr. Walker on this subject)?

I've seen dozens of posts out there about this, but none had a complete answer. Let me list my outstanding questions in this post.

ULTIMATE GOAL

To get DNN 4.x running on Windows 2003 Server, ASP 2, IIS 6, SQL Server 2005 Express.

OUTSTANDING QUESTIONS

1. DNN 4.3.5 worked for me simply after downloading the install package, unzipping, setting permissions, and configuring IIS, but WITHOUT CREATING A NEW DATABASE IN SQL SERVER EXPRESS AND WITHOUT ANY CHANGES TO CONFIG FILES. Thus, I question the section of installation instructions saying that you must create a database. I have (or actually, I had) an instance of DNN 4.3.5 working without the database creation part. Research indicates that in such default install situation, DNN uses the database file $ROOT/App_Data/Database.mdf. Given I have experimental proof, does this mean that the "create database" step is optional, and by default DNN will use the App_Data/Database.mdf file?


2. I would not be writing this if my portal continued to work. However, after about a week of operation it stopped working and now I'm having all sorts of database connection errors described in millions other threads on this forum. There have been no changes that I know of that might have caused this. And I'm definite that web.config file was never altered. Thus, my second question: if portal was working as described in #1 (above), what might have caused it to stop working and complain about database connections?


3. In trying to fix this, I have attempted to create the database via Microsoft SQL Server Management Studio Express and repoint my portal to that database. This only led to more questions. Hence this question number three: from the DNN's perspective, is there any difference between "SQL EXPRESS" (the one I have) and non-EXPRESS (i.e. SQL 2000 or SQL 2005) server?


4. In the web.config file there are two distinct configuration sections. Comments to one indicate that it is for use with "Express" SQL Server and comment for another indicate that it is for use with "2000/2005", non-Express versions. Here's one:




And here's another:


name="SiteSqlServer"
connectionString="Server=(local);Database=dnn;uid=dnnuser;pwd=dnnpass;"
providerName="System.Data.SqlClient" />

However, in a number of posts I saw suggestions that even if I'm using 2005 Express, I should still use the configuration section for "2000/2005", and my connection string should look something like this:





name="SiteSqlServer"
connectionString="Server=(local);Database=dnn;uid=dnnuser;pwd=dnnpass;"
providerName="System.Data.SqlClient" />

(note the "express" portion commented). Hence my fourth question: if I'm running SQL Express, which "flavor" of configuration should I use?


5. If as comments suggest, I should be using the "express" part of the configuration section for my SQL Express Server, how should the connection string look like? I mean, where do I specify username/password, etc.? There is absolutely nothing about this in both DNN books ("Installation" section by Mr. Walker).

Can I use this option without creating the DB via SQL Server Management tools? Can I simply point to the .mdf file on the file system? Somehow I get a feeling that "AttachDBFilename=|DataDirectory|Database.mdf" already points to the .mdf file that is by default located under App_Data directory.


6. Assuming I am eventually able to point to the database I created via SQL Management Tools, how to I get my data that is now in $ROOT/App_Data/Database.mdf file into that new database? Can I "attach" the .mdf file via SQL Management Tools? Or can I still somehow point back to my $ROOT/App_Data/Database.mdf file?


If there is anyone out there with understanding of these aspects willing to invest a little time to help out DOZENS IF NOT HUNDREDS OF TROUBLED USERS, please, please, please - DO SO! I wish installation instructions were more clear about these points. Maybe if someone is kind enough to answer my questions, this thread will server as such clarification? I'm only afraid this will remain unanswered like number of posts with similar questions I have seen...

Thank you for reading.
 
New Post
10/17/2006 11:12 PM
 

Well I am recently retired with some time on my hands so I'll see what I can do.

The installation guide in the docs folder seems to explain fairly well how to set up the installation. I am not an SQL expert but have set up many sites with at least 90% still functioning without errors. I'm not sure about default databases since I have installed in accordance with the standard procedures. Cutting corners often leads to problems down the road as you may be aware. I would always recommend creating the database before installation however I think we can put this back together for you.

The .mdf file cannot be linked to directly but through a named database on a SQL Server. Using Management Studio Express is very helpful. Most of your .mdf files are located in your SQL Express installation directory then drilling to "SQLInstance Name"\data. I think if you move your .mdf file there and attach it like you mentioned you will be able to use it directly.

There is really no mystery to using a proper connection string in the web.config file. There is a small compliction with the "SQL Express" or "SQL2000/2005" strings. I hve always used the second type of string even with "Express" databases without having problems - so I've just stuck with it. If you want a good "Express" string they are littered through the forum and you can locate them by googling the forum with the string - '"SQL Express" +ForumsDotNetNuke site:dotnetnuke.com'. You can change SQL Express to any search criteria and get quick results on other searches.

My web.config connection strings look like:
<connectionStrings>
       <!-- Connection String for SQL Server 2000/2005 -->
    <add
      name="SiteSqlServer"
      connectionString="Server=MikeJr\SQL2005;Database=DotNetNukeMD;uid=mikekist;pwd=xxxxxxx;"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
    <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules -->
    <add key="SiteSqlServer" value="Server=MikeJr\SQL2005;Database=DotNetNukeMD;uid=mikekist;pwd=xxxxxxx;"/>
    <add key="InstallTemplate" value="DotNetNuke.install.config" />

As you can see I deleted the Express strings entirely and set up the 2000/2005 strings in the 2 required places. You also must remember on an upgrade to copy the machinevalidation and decryption keys to the new web.config.

Let me know how you are making out.

Mike


Kist Enterprises
www.kistenterprises.com
 
New Post
10/23/2006 8:44 PM
 
Mike,

Thank you for your input! It helped clarify one part of my problem - about connection strings. You once again confirmed that I can use connection string in the "non-express" section of the config file, even if I'm running express.

I finally ran accross this post that has configuration steps that worked for me:

http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/107/threadid/21459/scope/posts/Default.aspx

(if link does not work, search for "Success! WinXP Pro" in "Subject", "General" forum)

Apparently, there are additional steps besides connection string that need to be performed on SQL Express, and SQL Express is indeed different from non-express versions (SQL 2000 and SQL 2005). I think step #6 was my problem - by default TCP/IP connectivity is disabled in SQL Express and needs to be turned on.

Anyway, I can confirm that precisely following steps described at the above link makes your installation with SQL Express work. One deviation from those instructions: since I already had my App_Data\Database.mdf file that DNN was using "by default" (and then broke), what I did was instead of creating a new database via SQL Studio Express, I attached that Database.mdf file. Other steps were the same.

All this still does not answer the question of why it was working by default and how exactly was it connecting to that Database.mdf file. And also why after successful operation for about a week it suddently broke. But you are probably right that users should not cut corners and if it says to create the database, they should create the database... The problem is that DNN actually works without that step, whatever method it uses to connect to that App_Data\Database.mdf. And that makes you think that "eh, ok, it works so why care".

Thanks,
Alex.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...All this needs to be explained in user guide / documentation!All this needs to be explained in user guide / documentation!


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