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 ...DNN Error: Connection To The Database Failed (SQL not working on Server 2008)DNN Error: Connection To The Database Failed (SQL not working on Server 2008)
Previous
 
Next
New Post
3/29/2018 3:24 PM
 
I have DNN running on Windows Server 2008 R2 64bit with SQL Server 200 R2 Express.  For some reason it stopped working (maybe because of an update, not sure).  The errors I'm getting seem to indicate that there is some permissions problem with the SQL database.
I've gone back to make sure that some setting wasn't changed.
In IIS 7.5, my application pool identities are all set to "ApplicationPoolIdentity".  Each individual website has a unique application pool (ex. IIS APPPOOL\MyWebsiteName) which has been given modify permissions on the folder of the website.  SQL Server Express is set to Windows Authentication mode only.
I've gone over every blog post and community forum entry that touches on this topic, but it still doesn't work. What am I missing?
 
New Post
3/29/2018 3:46 PM
 
In SQL Server the AppPool needs a 'login' - essentially permission to do anything at all in SQL Server, and then the login needs permissions to do whatever you need in the DB. For full DNN functionality it needs to be a dbowner.

Do you have those? I guess they *were* there else the site would not have worked in the past.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
3/29/2018 4:07 PM
 
I've seen several posts to this effect, but not completely clear as to precisely what it implies. 

Do you mean go to SQL Server Management Studio, and under Security > Logins add IIS APPPOOL\DefaultAppPool, then under Properties > User Mapping give db_owner for master?  I'm assuming I don't have to attach each database for every website.

As too whether it was already there, something got reset somehow, so I am assuming that something that was there before is now missing.
 
New Post
3/29/2018 4:24 PM
 
>>Do you mean go to SQL Server Management Studio, and under Security > Logins add IIS APPPOOL\DefaultAppPool, then under Properties > User Mapping give db_owner for master? I'm assuming I don't have to attach each database for every website.

Close, but not quite. You have several AppPools so you need to add a Login for each of them. IIS APPPOOL\Site1Pool, IIS APPPOOL\Site2Pool, etc.

For each Login you MUST map every database that the corresponding AppPool uses. Most likely one DB per pool, but depends on how your sites are structured. No mapping == that AppPool cannot access the database.

I doubt that ANY of them should be allowed anywhere near master.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
3/29/2018 4:55 PM
 
Interesting, since I never had to do that before.  In the past when I added a new website to the server, I just made sure that the AppPool had privileges on the website directory and that Load User Profile was set to True in IIS.  I never added any new logins to the SQL server.  Don't the all fall under the DefaultAppPool group?

Also, how do I map each DNN website database without attaching each database?

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...DNN Error: Connection To The Database Failed (SQL not working on Server 2008)DNN Error: Connection To The Database Failed (SQL not working on Server 2008)


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