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:
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…
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.
usertime must not be null in cs_Posts, so I set it equal to the postdate.
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:
Created a test IIS website to host my new site, and a new empty database.
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.
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.
Verified that the installation worked by browsing to my CS 1.1 default page.
Again, read and completed each step of the the Readme file.
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.
Backed up my CS 2.0 website and CS 2.0 database.
Now I want to move my blog from where it is by default:
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.
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”.
I then stopped the WWW Publishing Service, renamed my live site to “scottelkin_old” and changed the new one to “scottelkin”.
Because I changed databases, I had to update my web.config to point to the new one.
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.
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.
After a little hunting, I made a switch in the cs.config file and now all url's correctly point to my www domain.
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…
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.
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: