måndag 1 december 2008

Jan vs Microsoft Content Management Server 2002

My first post - and it's a REALLY REALLY long one!

I've recently had to deal with a configuration of Microsoft Content Management Server 2002 which had been moved around and upgraded over the years. Some of the problems I ran unto were fairly unusual and finding solutions to some of the problems were difficult at best. Here are those problems and the solutions that worked for me. If you run into any problems with CMS, you should first check out the following two pages:

Site Deployment FAQ

HOW TO: Troubleshoot Site Deployment Issues in Microsoft Content Management Server 2002

Unable to export data from a CMS site.

- Everything else, including imports, worked fine.
- CMS 2002 with SP2, upgraded from SP1a, running SQL Server 2005, upgraded from SQL Server 2000
- The export fails after almost exactly 30 seconds (stuck on 0% or 5%), then fails.
- The error details would specify "403 (Forbidden)".
- Using a packet sniffer like Fiddler would reveal the complete 403 reason to be Directory Listing Denied.
- The 403 is pretty irrelevant: If doing an export preview, the real error is revealed to originate from .Net SqlClient Data Provider, and have the description Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
- The pages linked to above offers a lot of suggestions, non of which helped us.

Solution: Install hotfix 913401:

FIX: If you try to perform a site deployment export operation to SQL Server 2005, the export operation fails in Content Management Server 2002 Service Pack 2

How to install the hotfix:
1. Make a backup of the CMS database!
2. Request it from the page above. (If you can't, see below.)
3. Download it, extract it using the password in the e-mail.
4. Copy _both_ files to the folder "(MCMS)\Setup Files\SQL Install". Make a backup of "_dca.ini" first.
5. Run the DCA. Re-select the database. When continuing, the DCA should ask you to confirm the database upgrade.
6. Done!

Thanks to:
David Longnecker
Stefan Gossner

Unable to view or request hotfix on support.microsoft.com

Not really an CMS issue, but when clicking the "View and request hotfix downloads" link on the hotfix page above, you get a page with no content.

Solution: Turns out Microsoft's support site isn't very well localized. It tries to show a localized (in my case a Swedish) version of the page, which doesn't exist. Click the link in the top right corner, above the search bar, to change your location to USA.

Unable to install or upgrade all components because they require "Microsoft Java VM", "Visual J#.NET redistributable 3.0", or doesn't detect your version of Visual Studio.

Solution: Here's the steps I've found necessary to safely install CMS SP2... Surely, lots can go wrong with this old system so it's of course not complete. It's probably not a bad idea to reboot between every step.

1. Install the original version, without SP:s. Check only the core Server component.

2. You need to uninstall the .Net framework 3.0/3.5, or Site Manager will not be available. (If you don't need the Site Manager, you can skip this step.) You can re-install the 3.0/3.5 framework afterwards, however, all this takes time, and you might break other things installed on the computer. There is a faster workaround - quoting Alan McBee:

This is a RegEdit thing, so the usual Warning About Tampering With The Registry apply/

In RegEdit, go to this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\

Rename the subkey v3.0 to something else -- I used XXXv3.0XXX.

In fact, I myself had to use this method, because uninstalling the framework still left that 3.0 key, so the Site Manager option was still disabled in the SP1a installation wizard.

3. Install SP1a. If you need them, install the Site Manager, Site Stager and the Dev tools now.

4. Change back the 3.0 registry key or re-install the .Net framework 3.0/3.5 (if you want it).

5. Install SP2.

6. Check Microsoft Update. There should be one single update from CMS available on Microsoft Update (under the "Office" category, I think). It is described as a security update, but you MUST get it if you are going to use SQL Server 2005, otherwise you wont be able to select the database in the DCA.

7. Install the hotfix mentioned above, if you are going to use SQL Server 2005 and if you are going to use a database from SQL Server 2000.

8. Create two websites in IIS, and create a new database (or copy an existing). Set up the security configurations, all the accounts and that boring stuff, and run the DCA/SCA.

9. If upgrading database from SP1a, make sure any custom built form still works (see below)

10. Done!

Thanks to:
Alan McBee

Unable to select SQL Server 2005 database in the DCA

Problem: Authentication errors and other errors when choosing a DB in DCA.

Solution: For CMS to support SQL Server 2005, CMS 2002 SP2 must be installed, AND an update must be installed from Microsoft Update! Check update.microsoft.com. There should be one single update from CMS available on Microsoft Update (under the "Office" category, I think). It is described as a security update, but you MUST get it if you are going to use SQL Server 2005.

Custom forms are broken after SP1a upgrade to SP2

Problem: After upgrading CMS 2002 SP1a to SP2, custom built forms are broken. They may refer to an invalid URL, giving the user a 404 when submitting a form. CMS is using ASP.NET.

Solution: This is because they introduced a bug in a JavaScript in SP2. First, the post-SP2 hotfix package MIGHT fix this, but only try this if your environment is "expendable", or if you manage to find more documentation than I did... Or possibly, there might be a fix available for ASP.NET.

Otherwise, you can do what we did - it's insanely ugly, but it works. Copy this little piece of code somewhere into all templates containing broken forms:

<script language=”javascript” type="text/javascript">
// hack to fix MCMS2002 SP2/ASP.NET generated action target
__CMS_PostbackForm.action = __CMS_CurrentUrl;
// -->

Basically, this line is for some reason not generated in the HTML output by CMS SP2, but it was in SP1a. So far we've seen no side effects from adding this snippet, please let me know if you do.

I hope any of this is helpful to anyone else! (I really mean that, otherwise I've wasted a lot of time writing this...)

2 kommentarer:

John sa...

I have been looking 3 days for the problem with the 2005 upgrade.. I thank you so very very much for this.

Jan sa...

I'm glad I could help!