Upgrade from CS 2.1 to 2007

rated by 0 users
This post has 27 Replies | 4 Followers

Not Ranked
Posts 35
Points 580
Arthur Dent Posted: Tue, Apr 17 2007 1:08 AM

I'm excited about the official release of 2007, but not sure how to upgrade my existing 2.1 site to 2007.  From what I can tell, the 2007 installation is only designed to create a new community, not upgrade an existing (2.1) community.  I'm hoping an article "Upgrading from Community Server 2.1 to Community Server 2007" will be written similar to these.

Thanks in advance for any pointers!

 

Top 50 Contributor
Male
Posts 536
Points 7,675

In the download for CS2007 (The web installer) there will be a subdirectory in the "sqlscripts" directory called "upgrade from previous versions" or something to that effect.  Here in this directory you will find appropriate SQL scripts to run on your existing database to upgrade it.  In your case cs_2.x_to_cs_3.0_upgrade.sql is the appropriate script for you. 

1)  Now be sure to back up your database first as well as your CS2.1 files in case something goes a rye in your upgrade.  Also I have found it helpful to refer back to the old files to refer to any custom content parts (things you double click to edit), etc... you may have added in CS2.1.  It will become apparent why this is helpful below.

2)  After you back everything up run the script mentioned above on your database.  Once that script is complete copy and paste the CS2007 files over your cs2.1 installation... overwriting files when asked.  (simply overwrite all is fine here)

3)  Update your connection string to your database.  No longer is it found in the web.config and instead it has it's own little file called...  ConnectionStrings.config.  Having backed up your old files you can refer back to your old web.config to get this if you are like me and tend to forget what it is.

4)  Once you have updated your connection string then when you visit your site it should be upgraded to CS2007.  Warning though as the theming engine in CS2007 is different (and much better) than that of CS2.1.  Hence if you designed a custom look for CS2.1 on your website it won't translate over like in other versions.  

If you created custom content parts, other than the generic one on the home page, in your CS2.1 site this brings me to my point earlier about backing up the old files to refer to any custom content parts, etc... you created.  Those items you created on your site in CS2.1 remain in the database but aren't yet reflected on your pages as the theming engine is different... hence they don't show up on your site until you edit your theme to make them appear.  I'll spare you the details of the theming engine for now but if you didn't make any customizations to CS2.1 you don't worry about it.

In summary... 

  1. Backup all your files and your database
  2. Run the appropriate script on your database to upgrade it from 2.1 to CS2007. (cs_2.x_to_cs_3.0_upgrade.sql)
  3. Copy the files for CS2007 over the files for CS2.1
  4. Update the connection string in the ConnectionStrings.config file to point to your newly upgraded database.
Then you should be able to visit your newly upgraded CS2007 site.  Let me know if you have any problems.
  • Filed under:
  • | Post Points: 65
Not Ranked
Posts 4
Points 50

Regarding Step #2.  Won't a straight copy/overwrite leave some unnecessary CS 2.1 files?  Would it be cleaner to delete files first and then copy?  Thanks.

Top 25 Contributor
Posts 1,592
Points 25,105
MVPs

Hi,

Yes it would be, but the risk of deleting something that CS 2.1 has created on the file system that you should not may be greater than the benefits.

Regards

Dave

Dave Stokes On Graffiti
Dave Stokes

  • | Post Points: 20
Top 50 Contributor
Male
Posts 536
Points 7,675

Dave Stokes:

Hi,

Yes it would be, but the risk of deleting something that CS 2.1 has created on the file system that you should not may be greater than the benefits.

Regards

Dave

 

Yes... my sentiments exactly.  As a novice with CS I find it best not to delete anything I'm not 100% sure I don't need.  Hence if a few extra files find their way on my site then so be it.  Rather have an unneeded file as opposed to not having a file I need. 

  • | Post Points: 5
Not Ranked
Posts 35
Points 580

Thanks Tom, this is outstanding!  Doesn't seem so daunting now that you've so clearly explained it.  I'll give it a shot tonight!

 

  • | Post Points: 20
Top 50 Contributor
Male
Posts 536
Points 7,675

 

Arthur Dent:

Thanks Tom, this is outstanding!  Doesn't seem so daunting now that you've so clearly explained it.  I'll give it a shot tonight!

Glad to hear it... remember if I can do it anyone can do it!  Big Smile    

  • | Post Points: 5
Not Ranked
Posts 14
Points 115
podpi replied on Wed, Apr 18 2007 3:25 AM

Thank you Tommyweather for your help.

I am having a problem however. After running the upgrade script, and copying the files across I now get this exception:

Server Error in '/forum' Application.

Specified cast is not valid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Specified cast is not valid.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Specified cast is not valid.]
CommunityServer.Components.CommonDataProvider.PopulateUserFromIDataReader(IDataReader dr, Boolean isEditable, Boolean includeAudit) +116
CommunityServer.Components.CommonDataProvider.cs_PopulateUserFromIDataReader(IDataReader dr, Boolean isEditable) +13
CommunityServer.Data.SqlCommonDataProvider.GetUser(Int32 userID, String username, Boolean isOnline, Boolean isEditable, String lastAction) +397
CommunityServer.Users.GetUserFromDataProvider(Int32 userID, String username, Boolean isOnline, Boolean isEditable, String lastAction) +39
CommunityServer.Users.GetUser(Int32 userID, String username, Boolean isOnline, Boolean isCacheable, Boolean fromCache) +1196
CommunityServer.Components.CSContext.get_User() +63
CommunityServer.Components.CSLocation.ThemePage(ReWrittenUrl url) +38
CommunityServer.Urls.Location.GetReWrittenUrl(ReWrittenUrl url, String path, String queryString) +13
CommunityServer.Urls.Location.GetReWrittenUrl(HttpContext context, String path, String queryString) +143
CommunityServer.Urls.UrlReWriteProvider.GetRewrittenUrl(HttpContext context) +140
CommunityServer.CSHttpModule.ReWriteUrl(HttpContext context) +23
CommunityServer.Components.CSContext.ExecuteUrlReWrite() +23
CommunityServer.CSHttpModule.Application_AuthorizeRequest(Object source, EventArgs e) +123
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Do you know what could be wrong?

Thanks in advance.

 

forf1sake.com - underground formula 1
  • | Post Points: 20
Top 50 Contributor
Male
Posts 536
Points 7,675

 Hmmm.... I'm not sure.  Let me contact someone to look into this further for you.  You ran the appropriate script as well as copying the new CS2007 files correct?  Did you mistakenly copy back the web.config and communityserver.config files back over your CS2007 files?  Have you tried restoring the backup of your database and files and running the script again to see if you can duplicate the problem?  Do you have any custom CSmodules running on your site?

 

  • | Post Points: 35
Not Ranked
Posts 2
Points 55
bill_pcle replied on Wed, Apr 18 2007 3:41 PM

Will my 2.1 License file work with 2007? 

 

  • | Post Points: 35
Top 25 Contributor
Posts 1,592
Points 25,105
MVPs

Hi,

No.  You will a new license file.

Regards

Dave

Dave Stokes On Graffiti
Dave Stokes

  • | Post Points: 5
Top 200 Contributor
Posts 123
Points 1,780

 

I tried test update today, but I get this error message:

You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.

I'm not sure from where I can fix this problem. Help! Thanks! Smile

Jasper Jugan
  • | Post Points: 5
Top 200 Contributor
Posts 123
Points 1,780

jasperjugan:

 

I tried test update today, but I get this error message:

You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.

I'm not sure from where I can fix this problem. Help! Thanks! Smile

by the way, this problem is raised whenever I try to login.

Jasper Jugan
  • | Post Points: 5
Not Ranked
Posts 14
Points 115
podpi replied on Thu, Apr 19 2007 3:50 AM

Hi Tommy... Yes to all of the above. Simply ran the update script, successfully and copied all the 2007 files across on top and all went successfully. I am going to re-do the above and see if I have any luck. If you have any further suggestions please let me know.

Thanks 

forf1sake.com - underground formula 1
  • | Post Points: 5
Not Ranked
Posts 14
Points 115
podpi replied on Thu, Apr 19 2007 5:15 AM

Hi Tommy

After trying to redo the installation, (I'm using GoDaddy hosting) and on running the 'cs_2.x_to_3.0_upgrade.sql' query through Go Daddy's query analyser I get this error (I could've sworn it ran right the first time):

 

Line 1: Incorrect syntax near 'BEGIN'.

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

--Update Apple release databases to Johnny... Use the 01 patch as a template this
--one has special prerequisite handling

DECLARE @Major int, @Minor int, @Patch int, @Installed DateTime, @Prereqs int

Set @Major = 2;
Set @Minor = 1;
Set @Patch = 0;

Select @Prereqs = isnull(Count(InstallDate),0)  from cs_SchemaVersion where Major=2 and Minor=0 and Patch<58

Select @Installed = InstallDate  from cs_SchemaVersion where Major=@Major and Minor=@Minor and Patch=@Patch

If(@Installed is null AND @Prereqs = 57)
BEGIN
--## Schema Patch ##

--All we are doing is updating the schema revision

--## END Schema Patch ##
Insert into cs_SchemaVersion(Major, Minor, Patch, InstallDate) values (@Major, @Minor, @Patch, GetDate())

 and so on...

 Any idea why I'm getting my sql error?

 Thanks
 

forf1sake.com - underground formula 1
  • | Post Points: 20
Page 1 of 2 (28 items) 1 2 Next > | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com