Backing up hosted DNN to localhost +Vista
Last Post 02/16/2009 8:03 PM by Dan Whitacre. 33 Replies.
Author Messages
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/11/2009 7:53 AM  
I watched the tutorial, "How to backup a live hosted DotNetNuke website and restore it to a localhost installation" several times.  I also watched and executed successfully "Installing DNN to Vista" localhost.

What I am struggling with is the RESTORATION of a SQL2005 db on my local SQLEXPRESS.  I am getting an error each time.  I am wondering if I need to somehow create a NEW local db with the same name as my production db (DNN2008) and then try the backup restore.

The video makes this restoration step seem so easy, but I cannot get past the DB restore.

Help?
Joseph Craig
DNN MVP
Posts:11667


--
02/11/2009 7:57 AM  
What errors do you get?

If creating a blank database and restoring over it works, do it!

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/11/2009 9:18 AM  
I suspect that I am doing something wrong. I cannot seem to create a new db...permission issues. Anyway, I don't want to do anything different that what is normal. I am thinking that I should try to do it exactly as Lee suggests...so I can figure out how to undo it.

So, with that as a backdrop. I have three dbs on my system. On is SQLExpress and is running DNN5.0_test for 3rd party module testing. That is completely clean...no modifications, yet. I want my production site to run locally so I can upgrade it. Should I be able to do this exactly as the video says when running Vista? And, already having ONE DNN install working?
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/11/2009 9:43 AM  
Either this machine has issues, or I have them. I REPEATED all the steps EXACTLY like I did several times earlier. The only thing different is that I restarted my box.

The restoration was completed EXACTLY as it was advertised in the tutorial! So, the database issue is no longer an issue. ON to the next thingy.

Thank you.
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/11/2009 8:52 PM  
Okay, I reviewed the entire set of tutorials again. I am seeing things in vista that are different than Lee's OS, I think. In Vista, the IIS configuration looks different. I never see the choice to "tick Execute." And, there is NO properties when I right click the virtual directory. I muttered through, guessing as I went along. I also did not get a choice to add ASP to the permissions... Since I got the DNN 5.0 working using Network System, I choose that. Here's the results:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:


Line 60:
Line 61: <!-- Ensure validationkey is not set to AutoGenerate,IsolateApps so it correctly supports webfarms -->
Line 62:
Line 63: <!-- HttpModules for Common Functionality -->
Line 64:


Source File: C:\DotNetNuke Sites\dnn_NKY_471\web.config Line: 62



Show Additional Configuration Errors:


It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\DotNetNuke Sites\dnn_NKY_471\web.config line 121)
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\DotNetNuke Sites\dnn_NKY_471\web.config line 179)
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\DotNetNuke Sites\dnn_NKY_471\web.config line 180)
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

Of course, I see this line, "This error can be caused by a virtual directory not being configured as an application in IIS." But, I have NO idea how to remedy the matter.
Joseph Craig
DNN MVP
Posts:11667


--
02/11/2009 11:25 PM  
Make sure that you viewed How to install DotNetNuke to Vista

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 6:30 AM  
I have viewed that tutorial and was successful in installing DNN 5.0. As I slept, I realized the IIS problems I was seeing start with the fact that I created a Virtual Server....as the "Backing up hosted DNN to localhost" says I should; BUT, when I configured IIS for the DNN 5.0 installation, I configured IIS as an APPLICATION (rather than a virtual server). I will try the "application" route and see what happens.
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 6:50 AM  
"Progress over perfection," means I have reconfigured the localhost as an application instead of a virtual server and I am no longer seeing the error reported above. Now, I see "This site is currently Unavailable Please check back later." Since I have 4 portal alias' (3 parent and 1 child), I am wondering if I am required to install all of those in order to get live site up on my localhost (I thought I could get the main one up and then add the remaining alias'). I will add those other alias(es) and see what happens.
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 7:13 AM  
More progress? I now see: "Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NorthernKYian'. The user is not associated with a trusted SQL Server connection."

This seems to imply I did something wrong in setting up my connection string from SQL2005 to SQLExpress. The username and password match the permissions in db.

This parameter in my web.config is suspect: "providerName="System.Data.SqlClient" That follows the userID and Password in the connection string. It was part of the string in 2005 and Lee does not specifically indicate it should be cut, so I left it (I thought I saw it there).

Any guidance?
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 7:17 AM  
I cut the parameter and I am back to "This site is currently Unavailable
Please check back later." The only other thing that is questionable to me is that child portal. In trying to "add application" in IIS7, I could not add a "/" for that child. I will have to look at how I named that alias in my live site.
Joseph Craig
DNN MVP
Posts:11667


--
02/12/2009 8:26 AM  
No, you do not want to remove providerName="System.Data.SqlClient" from the connection string.

The error message indicates that you do not have a "trusted connection" to the database.  Google for that phrase.

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 9:28 AM  
Yes, I do understand. I reviewed both series of tutorials again. I replaced the "providerName" line and tried it again. My first browse returns the Under Construction screen, but an additional attempt returns the TRUST issue:

Login failed for user 'NorthernKYian'. The user is not associated with a trusted SQL Server connection.

I went through the security options and I have the "user" configured in SQLExpress and the password associated with the user and the login added to the db. I have no idea what I am missing.

I don't have Visual Studio express, would that help me troubleshoot the connection issue? Would it guide me?
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 9:41 AM  
Okay, this seems like a problem to me:

"Windows Authentication" is the selected Authentication Method. Since I am very unskilled in DBs, I am guessing that is wrong....because I am passing an ID and password. It is not apparent to me, how to change that method. Can you guide me? BTW...at some point in the restore process, I think I should have stumbled upon this option.
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 9:45 AM  
In an effort to find an example to work from, I attempted to look at my DNN 5.0 file. It is not working any longer.

Dang!
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 10:09 AM  
Progress? Followed the Microsoft instructions for allowing my server to use mixed mode authentication. I have a new (non specific) error:

DotNetNuke Error: - Version 04.08.04

An error has occurred.
An error has occurred.

Double-Dang!

Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 10:16 AM  
In the URL bar, I see this: "Default.aspx?tabid=36&error=Object+reference+not+set+to+an+instance+of+an+object.&content=0"

What the heck?
Joseph Craig
DNN MVP
Posts:11667


--
02/12/2009 11:02 AM  
Do you have SQL Server Management Studio Express?  Can you use it to connect to your database?

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 12:22 PM  
I have using SQL Server Management Studio Express to do EVERYTHING with the db...including restore it, add user, and add login to the database.
Joseph Craig
DNN MVP
Posts:11667


--
02/12/2009 12:29 PM  
The connection string in web.config should use the same parameters that you use to connect with SSMSE.  Server name, database name, userid, password.

If you are using integrated security for SSMSE, see if works in DotNetNuke.

Note that there are two forms of the connection string: one for SQL Server and one for SQL Server Express.

Also note that there are two places where you specify the connection string in web.config.


If you've already done all of that, I'm stumped! 

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 1:06 PM  
Okay:

If you are using integrated security for SSMSE, see if works in DotNetNuke.
<<<>>>>

Note that there are two forms of the connection string: one for SQL Server and one for SQL Server Express.

<<<>>

Also note that there are two places where you specify the connection string in web.config.

<<<


<!-- Connection String for SQL Server 2005 Express -->
providerName="System.Data.SqlClient"/>
<!-- Connection String for SQL Server 2000/2005 -->
<!--add
name="SiteSqlServer"
connectionString="Server=*****.com;Database=*****;uid=*****;pwd=*****;"
providerName="System.Data.SqlClient" />
-->


<!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules -->

<!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules

-->
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 1:11 PM  
Wow.... that really doesn't look like my comments.
1) I don't know whether I am using integrated security or not. I don't even know what that is.

2) I understand the two forms. I think I did that perfectly

3)I see the two locations. I will try to paste those sections again:


<!-- Connection String for SQL Server 2005 Express -->
providerName="System.Data.SqlClient"/>
<!-- Connection String for SQL Server 2000/2005 -->
<!--add
name="SiteSqlServer"
connectionString="Server=x.com;Database=DNN2008;uid=*****;pwd=*****;"
providerName="System.Data.SqlClient" />
-->


<!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules -->

<!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules

-->
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 1:12 PM  
The section I am trying to paste won't stay pasted.
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/12/2009 1:21 PM  
According to SSMSE, I am connected to my database and I am connected via SQL Authentication. The userID even says it's the DBO
Joseph Craig
DNN MVP
Posts:11667


--
02/12/2009 1:27 PM  
I think that I am going to have to vote "stumped." It "seems" that you are doing all of the right things, yet something clearly is wrong.

Is this a brand new installation?

If it is, it might be time to delete the database, delete the web directory and start over.


I'm guessing that you haven't even gotten to the part where you see the installation wizard. Is that correct? If you did, you should have been able to check file permissions and check the database connection.

Yeah ... start over from scratch if this is a new installation.


Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/13/2009 3:38 PM  
Joe,

I think I am going to do two things:

1) I am going to start all over.
2) I am going to use a machine that has a clean Vista OS (mine has all kinds of stuff on it)

I do want to clarify one issue for you. I was successful initially with a DNN 5.0 fresh install on this Vista box (the db stuff was pretty much automatic). That install does not work any longer.

After I proved to myself that I could get a local DNN application running, I tried to bring a copy of my production site (multiple parents and a child portal) from DNN4.8.4 (I think) over. That NEVER ran successfully and it screwed up my fresh install of DNN 5.0.

Lastly, Lee sent me a note yesterday...indicating that I could attach screen shots, but I cannot see any functionality that allows that here (I see ActiveForums 3.7 below).
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/13/2009 3:40 PM  
I do have ONE additional line of questioning. Would it be easier for me to use Visual Web Devoper Studio Express to get these localhosts running? I have just downloaded the 2008 version (since I see Lee use it in his tutorials...I like his references to the colors...to make sure I am doing it right). Is that the right version?
Joseph Craig
DNN MVP
Posts:11667


--
02/13/2009 3:46 PM  
No.  Stay away from Visual Web Developer unless you are going to build modules.

Get DotNetNuke running as a web site.  Start with the install version and start with a new and empty database.

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/13/2009 4:10 PM  
Joe,

All the tutorials show Lee editing the web.config file with VWD. I was thinking that Could reduce the possibility of error on my part. Also, I thought that tool has some diagnostic stuff related to database connections (I can do the content stuff, it's the db and ISS that seem to throw my non-CS mindset).

So, if I respectfully reject your advise (on this topic), which version would I use?
Joseph Craig
DNN MVP
Posts:11667


--
02/13/2009 4:15 PM  
Since you are using a "modern" version of DotNetNuke, you may never have to edit the web.config file.

The diagnostic stuff is part of the DotNetNuke installation wizard.

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/13/2009 4:42 PM  
I have DNN versions and DBs going back to early 4 (4.0.1, if my first I think). The only version I haven't had to edit the web.config, so far, was the fresh install of DNN5.0 on my localhost, but I will need to alter that to upgrade my production site, correct?
Joseph Craig
DNN MVP
Posts:11667


--
02/13/2009 6:24 PM  
I was actually referring to the need to "merge" data from the old web.config into the new one when doing an upgrade.

Upgrading from versions 4.6.2 and higher no longer require that you do it.  Just unzip the upgrade release on top of your web directory and then browse to your site to upgrade.

When you move your 5.x site (or any other site) from development to a live server, you'll still have to edit the connection strings to point to the live site's database server.  You won't have to copy machine keys or other items.

[Note to me and to others who may know more about this:  I did recently see an example in which the connection strings were stored in a separate file.  I need to figure out how to do this!]

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/15/2009 4:14 PM  
Is this a brand new installation?

If it is, it might be time to delete the database, delete the web directory and start over.

The new install was just a proof step. My goal is to get a production site running locally. I can delete the restored db. Exactly what is composed of "the web directory."

d
Joseph Craig
DNN MVP
Posts:11667


--
02/15/2009 11:06 PM  
The "web directory" is the directory into which you copied the DotNetNuke files. It's also the directory that is the directory specified for the website in the IIS configuration.

Joe Craig, Patapsco Research Group
Complete DNN Support
Dan Whitacre
Nuke Ace
Nuke Ace
Posts:45


--
02/16/2009 8:03 PM  
Joe,

Taking your advise, I deleted everything and started all over. It did take a bit of effort, but I have EVERYTHING running on my local host now....UNDER VISTA. The battle is over.

Two things worthy of recording.... Firstly, I noticed that my initial problems were the result of my original FTP download. That process was evidently interrupted at some point and I was missing the "Providers" folder. That must be called as part of the startup process and since it was not there, I saw the "This site is under construction" My learning...If I see that error, I am starting all over immediately.

Secondly, configuring a child portal is a little tricky (following the logic of Lee). On all the parents he named them by using the domainname+com, but a child looks like domainname+com/childname. So, even though DotNetNuke will allow you to create a PortalAlias with a "/", you cannot name the internet application with a forward slash in it under VISTA. And, I wasn't sure what directory to point to, since my ChildPortal had its data in a subdirectory of its parent. It took a bit, but I just gave the alias the name of the child and I pointed IIS to the root directory of the portal....AND, everything worked out.

Lastly, IIS under Vista and VISTA security is a bit different than the OS in the tutorial....with patience and persistence localhost sites are doable. DNN 5.0 and DNN 4.8.4 are running locally. I will upgrade everything to 5.0, add some custom modules and then see if I can push them out to the production site.

THANK YOU, so much!


---