Products

Solutions

Resources

Partners

Community

About

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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DNN 7 won't connect to database after copy from live site to localhostDNN 7 won't connect to database after copy from live site to localhost
Previous
 
Next
New Post
2/23/2017 4:58 PM
 

I've copied my live DNN install to localhost for debugging, but it won't connect to my database. I'm finding it really hard to troubleshoot the issue because I'm not getting anything useful from the DNN -- just says it can't connect.

I've done all the usual.

Copied site to directory with network service modify access, added site to iis, modified hosts file. Site loads at dnndev.me, then hits the cannot connect error.

Integrated Security. Even tried creating sql login. No dice. SqlServer 2016, DNN 7.4.

I can access this database fine in SSMS with full permissions.

<add name="SiteSqlServer" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=rs1;Integrated Security=True" providerName="System.Data.SqlClient"/>

What am I missing? And even better, how do I troubleshoot this so I can figure out the issue in the future?

 
New Post
2/23/2017 5:10 PM
 
When you can connect to the database using SSMS, are you connecting from the server that's running DNN?

Is the SQL server a separate machine?



Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services (http://patapscorg.com)
 
New Post
2/23/2017 5:35 PM
 

Thanks for the quick help, Joe!

Yes, everything is on my dev machine.  IIS, SSMS, SQL Server.

 
New Post
2/23/2017 7:07 PM
 
Okay, I'm in, but I still don't know why. I am able to connect with Sql Server authentication this way:

add name="SiteSqlServer" connectionString="Server=.\SQLEXPRESS;Database=rs1;uid=sa;pwd=<my pwd>;" providerName="System.Data.SqlClient"

sa and Network Service look identical to me in logins. I haven't been able to find any account that will work with integrated security.
 
New Post
2/24/2017 4:22 PM
 
for integrated security, you would need to use the windows account, specified in IIS app pool advanced settings.
If it is set to appPoolIdentity, it is a bit tricky to specify the windows account in SQL Server

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DNN 7 won't connect to database after copy from live site to localhostDNN 7 won't connect to database after copy from live site to localhost


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