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 ...Windows 7 - database file permissions keep removing themselvesWindows 7 - database file permissions keep removing themselves
Previous
 
Next
New Post
2/9/2010 11:53 AM
 

Hi

I'm running Dnn 5.2.2 (pro) on Windows 7 with VS2008 & SQL2008 Express. Often, if I need to query the database using SQL Mgnt Studio I have to stop the IIS web service before SQL is able to attach to the database (.mdf) file.  

Sometimes when I've disconnected the database file in SQL & then restart IIS I am taken to the Install Wizard !!!! 

The only way I've found to fix this is to examine the security properties of the DNN database & log files.  And grant SYSTEM full control of the mdf and log files in the app_data directory.  This fixes the problem and then DNN will start up the normally. 

Note: This permission has to be granted again and again sometimes several times a day.

 
New Post
2/10/2010 12:00 AM
 

it's not really a permissions error. SQL express 2005/2008 has 2 ways of working, either as user instances or server instances (see http://msdn.microsoft.com/en-us/libra...). If you use user instances your connection string will look like this :

<add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" providerName="System.Data.SqlClient" />

The keypart here is the AttachDBFilename - this is what tells the sql express service to open it from the directory (actually in administrator mode) whenever a web request asks for data from that connection

If you attach a sql express database to a server (e.g. to use sql server management tools) you've moved it out of that mode i.e. it has a persistent connection to the files. Hence when you start your website it tries to connect to the file(s) but see's that something has a persistent connection, therefore the files are not available as user instances. As you can't connect to the database the install wizard will then kick off as it assumes you want to connect to another place e.g. change the connection to point to your server instance.

The "hack" you've done is to set System, so user instances and server instances use the same account, so see it as only 1 connection. This is quite dangerous, as potentially any sql injection could affect file(s) on the server. I recommend you stick with one model or another.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Windows 7 - database file permissions keep removing themselvesWindows 7 - database file permissions keep removing themselves


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