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 ...DotNetNuke 4.0.2 SQL connection string sillyDotNetNuke 4.0.2 SQL connection string silly
Previous
 
Next
New Post
2/12/2006 11:43 AM
 

I wasn't that lucky when I tried to install DotNetNuke for the first time. After reading this forum I believe many had the same frustation like mine. I did figure out where the problem was and I like to share it with everybody. In my case I consider it was silly.

I'm using Windows XP Pro SP2 with 256 MB of memory on Transmeta Crusoe 800 MHz. The database is SQl Server 2000. I'm installing DotNetNuke 4.0.2 using 'install' package.

The following are three error messages I had one after the other:

1. Could not find file "...\Providers\DataProviders\SqlDataProvider\DotNetNuke_template.mdf"
2. Could not find file "...\SiteUrls.config"
3. Object reference not set...

Those error messages could be misleading but the source of the problem is somewhere 'near' the connection string setting in web.config.

I was using notepad to alter web.config file. I overlooked the comment end markers '-->' on two places. By default web.config commented out connection string for SQL Server 2000 but NOT SQL Server 2005 Express. At first I thought both are NOT commented (See the original part one and two below). So I commented SQL Server 2005 Express. I FORGOT line 12 on part one and line 6 on part two. Only after few trials, internet searches and reading the forum I come back to the web.config and read it thoroughly. I saw the sillyness and solved the installation problem. The comment end markers '-->' were not appropriatedly placed or removed.


Original part one

1  <connectionStrings>
2    <!-- Connection String for SQL Server 2005 Express -->
3    <add
4      name="SiteSqlServer"
5      connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"
6      providerName="System.Data.SqlClient" />
7    <!-- Connection String for SQL Server 2000/2005
8    <add
9      name="SiteSqlServer"
10      connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"
11      providerName="System.Data.SqlClient" />
12   -->
13  </connectionStrings>


Altered part one

1  <connectionStrings>
2    <!-- Connection String for SQL Server 2005 Express
3    <add
4      name="SiteSqlServer"
5      connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"
6      providerName="System.Data.SqlClient" />
7     -->
8    <!-- Connection String for SQL Server 2000/2005 -->
9    <add
10      name="SiteSqlServer"
11      connectionString="Server=(local);Database=DotNetNuke;uid=DotNetNukeUser;pwd=dnnadmin;"
12      providerName="System.Data.SqlClient" />
13  </connectionStrings>


Original part two

1  <appSettings>
2    <!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules   -->
3    <add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>
4    <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules
5    <add key="SiteSqlServer" value="Server=(local);Database=DotNetNuke;uid=;pwd=;"/>
6    -->


Altered part two

1  <appSettings>
2    <!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules 
3    <add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>
4    -->
5    <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules -->
6    <add key="SiteSqlServer" value="Server=(local);Database=DotNetNuke;uid=DotNetNukeUser;pwd=dnnadmin;"/>

 

 
New Post
2/12/2006 5:31 PM
 
 

http://www.sqlstrings.com/SQL-Server-connection-strings.htm

I suggest a "Trusted Connection" for "Integrated Security" instead of putting a username and password in your web.config (not as secure). This will allow the 'NETWORK SERVICE' or 'ASPNET' user that you've given permission on the webserver for your site's db and virdir (db owner and virdir full control).

You can generate specific ADO connections and connection strings this way:

  1. Create a text file and save it with the extension of ".udl" (.UDL).
  2. Open the new file by double-clicking through file explorer, for example
  3. the .UDL extension will be opened by 'Data Link Properties' dialog
  4. use this to create a connection to your database
  5. in this utility, find the connection string text line and copy it to your clipboard to use
 
New Post
2/20/2006 6:06 PM
 

John,

What is step 6 in your post above. I'm not a DBA guru so I don't know what the next step in your cookbook recipe is. If not web.config, then where would I copy and use this string I successfully created using a ".udl" file?

It seems like a great idea not have a password sitting in a file on the IIS server. I can really get behind that idea.

Thanks,

--Bill

 
New Post
2/21/2006 7:44 AM
 

Check out this link http://aspnet101.com/aspnet101/tutorials.aspx?id=23 on how to setup trusted connection. But as the tutorial suggest I'm a liitle bit skeptical on impersonating 'Administrator' account for IIS web server.

 
New Post
2/21/2006 8:39 AM
 

JonAskew,

Microsoft does recommend using integrated security (Windows Authentication), but believe me when anyone gains access to that file, it's gonna be the least of your problems, since that means the intruder has already gained access to your machine and can do many things more and he doesn't really need your password to get access to the DB cause he can do it anyway with integrated security.


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...DotNetNuke 4.0.2 SQL connection string sillyDotNetNuke 4.0.2 SQL connection string silly


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