Community Server Upgrade Hell

This last week I was tasked with upgrading a Community Server 1.1 install to 2.0.  I was expecting a simple process after navigating the seas of .Text to CS 2.0, but I forgot to “knock on wood”.

I ran the upgrade script as indicated in the upgrade instructions and got about 15 separate errors.  I don’t remember what they all were, but there was about three missing fields in various tables that I had to add before the script would complete successfully.

Once that was done, I copied the new web files over the old ones, and tried browsing to ye’ ol’ default.aspx which resulted in a Yellow Page of Death.

I assumed that the CS website wasn’t the problem, and could assume it was my database installation, since I had a gazillion errors on install.  I booted up SQL Profiler and filtered on “TextData” for “%cs_%” and “%aspnet_%”, which would only grab sprocs called in Community Server (all sprocs start with either aspnet_ or cs_).

After starting Profiler, I browsed to default.aspx again and watched what happened.  Each sproc that was called I compared against my scottelkin.com blog and compared the results.  By doing this I found the following three problems:

  1. All my users were missing from the cs_Users table. I was able to reassemble them by looking at the aspnet_users for the MembershipID, and looked through the cs_Posts table to find the UserID. I tried to look at a backup, but that was another stupid problem I ran into…
  2. postconfiguration must not be 0 for each post in the cs_Posts table. I changed them to 11. Not sure why 11 and not 1 or 2 or 3. My blog had 11 for each post, so there you go.
  3. usertime must not be null in cs_Posts, so I set it equal to the postdate.

.Text to Community Server 2.0

I made the leap and upgraded my blog to Community Server (CS) 2.0.  It took about 4 hours researching, downloading, uploading, converting and fixing. 

I couldn’t find a way to directly upgrade my .Text Version .95 directly to CS 2.0, so I decided to first upgrade from .95 to CS 1.1, then use the standard upgrade path from CS 1.1 to CS 2.0. Here is what I did in detail:

  1. Downloaded CS 1.1.
  2. Created a test IIS website to host my new site, and a new empty database.
  3. Read through the CS 1.1 Readme file and created a CS 1.1 Database. For some reason I kept getting SQL errors when using the wizard, so ran InstallCommon.sql, InstallMembership.sql, InstallProfile.sql, and InstallRoles.sql myself. I then rerun the wizard and it finished.
  4. Finished the CS 1.1 Readme file instructions.

    Special Note: My .Text install used a single site configuration, meaning my blog was directly off the root directory. There are ways to tweak CS 1.1 to also have this, but because we are directly upgrading to CS 2.0, you don't need to do this. We will attack this at the end.

  5. Verified that the installation worked by browsing to my CS 1.1 default page.
  6. Backed up my CS 1.1 database, and .Text database.
  7. Downloaded and ran Kevin Harder's DotText-CS-Converter Utility (Version 2.2).
  8. Read the utilities "READ_ME_FIRST.HTML" and followed it to the "T".
  9. I got an error that “IsActive” column doesn’t exist, but all you have to do is add that bit column to your blog_config table and make sure it gets populated.  He explains this in his blog post.
  10. Tested my CS 1.1 website and verified all my old posts were showing up.
  11. Backed up my new CS 1.1 database.
  12. Downloaded the Community Server 2.0 Web Installer to upgrade from CS 1.1 to CS 2.0.
  13. Again, read and completed each step of the the Readme file.
  14. Tested my (now) CS 2.0 website.  Keep in mind my http://www.scottelkin.com site is still working and pointing to the scottelkin database.  My test site is working at http://localhost:81 and mapped to my temporary scottelkin2 database.
  15. Backed up my CS 2.0 website and CS 2.0 database.
  16. Now I want to move my blog from where it is by default:

    http://scottelkin.com/blogs/blog_0/archive/2006/02/15/7456.aspx

    and switch it to the root at:

    http://scottelkin.com/archive/2006/02/15/7456.aspx

    This will mirror my .Text installation and make sure that all old links to my site don't break.

  17. For this, I followed Dan Bartels – Blogging At the Root.
  18. The one question I was unsure of was what my “defaultApplicationKey” was.  Because I had tested my installation prior and saw “blog_0” in the querystring, I guessed that and was correct.  All the other settings were by the book.
  19. At this point, I decided to make my site live.  I restored my scottelkin2 database into my scottelkin database.  Funny enough, I had never tried that before.  It just took me actually reading the column headings of the restore dialog and it went very smoothly.  I had to make sure it showed “scottelkin2_data” was being restored into “C:\data\scottelkin_data.mdf”.
  20. I then stopped the WWW Publishing Service, renamed my live site to “scottelkin_old” and changed the new one to “scottelkin”.
  21. Because I changed databases, I had to update my web.config to point to the new one.
  22. I also changed my SiteURL in the cs_Sites table to my fully qualified “www.scottelkin.com”.  I doubt that mattered, but did it just in case.
  23. At this point my site was hanging externally, but worked locally.  This was caused by my ISAPI_Rewrite extension I installed to rewrite all http://scottelkin url’s to http://www.scottelkin.com. Community Server was rewriting all http://www.scottelkin.com url's to http://scottelkin.com, then the extension would re-write them back. Ouch. When I nuked that, all worked fine, except now Community Server was re-writing to scottelkin.com which I didn't want..  This was why I was using the extension to begin with, as Google will rank your www and non-www url’s separately, yielding lower PageRank all around.
  24. After a little hunting, I made a switch in the cs.config file and now all url's correctly point to my www domain. 

And now to start customizing…

Counting Down Until Community Server

I am counting down the days until February 17th when Community Server version 2 goes RTM.  The latest Beta 3 were released last week, and I am biting my download trigger finger to keep from installing it.  Just a few more weeks…

Communityserver

Sometime in the recent few weeks I jumped to a Google PageRank of 5, which has seemed to increase the comment spam to annoying levels.

Between and that and how sick I am of staring at my site design, oh boy can I not wait any longer.

Also in my quest to stare blindly at the Community Server site, I noticed a new Videos section.  I watched a video Rob Howard walking through a few sites that are using the new engine.  Pretty nifty.

Community Server uses some ASP.NET 2.0

Pretty cool those guys are, thinking ahead and all. I just noticed that my CS 1.0 database has all (or near all, not sure) the tables and stored procedures that get installed for ASP.NET 2.0 membership, profiles, role management and personalization.

To get it in your database, assuming you have the 2.0 framework installed is to run:

C:\windows\Microsoft.NET\Framework\$VERSION #$\aspnet_regsql.exe

That will kick off a SQL Setup wizard to give you what you need.

I am not sure, but was Beta 1 even out yet when CS came out? Those ex-softies get all the goods early!