Tuesday, July 17, 2007

ALWAYS ALWAYS Run PRESCAN before migrating Sharepoint 2003 to MOSS

I just got bit by this recenty. ALWAYS run prescan.exe on your SharePoint 2003 environment before you migrate to MOSS 2007. Prescan prepares the database for upgrade. In particular, it parses and saves list definitions with the associated lists, as well as reports any errors that will cause the upgrade to fail. I have already done 2 SharePoint 2003 to MOSS 2007 migrations in a test environment and things moved over pretty well (I did this to document the post migration steps required for our environment - VERY GOOD PRACTICE). Finally when we were migrating to stage -- upon attaching the database using stsadm I got the following error.

"The [Databasename] on [servername] contains user defined schema. Databases must be empty before they must be used. Delete all tables, stored procedures and other objects or use a different database".

After going over what we did differently this time, we realized that we had forgotten to run prescan that day before backing up and moving the database. So we did exactly that and the migration to stage went as expected.

So run prescan early and often if you are migrating to MOSS 2007.

Thursday, July 12, 2007

The RIGHT way to enable SSL on MOSS Web Applications

I have been going back and forth a few times on enabling SSL on MOSS 2007 Web applications and here is the way that I have found to work best.

1. Go to central admin --> Create or extend a new web application --> Create a new web application.
2. Fill in the Web app, DB and App pool names as usual. Select yes to enable SSL on the web application. If you are using host headers for this web app, then enter those too. (Important: Make sure to set the port to 443, not 80).
3. After the web application has been created, reset IIS and then open up IIS mmc. Scroll to the IIS website that MOSS just created for you and select the right SSL certificate from the available certificates (Ask your network folks to generate an internal or external SSL cert for you depending on whether this is a test or prod server). Important: Go to the Home Directory tab and click Advanced. Make sure you set the host header and the right IP for port 80. For SSL entries, select port 443 and the IP. (If you have multiple IP's on the server, I usually pick one here for these entries). Click on the edit button for SSL entries and check the 'Require SSL' box. Also check 'Require 128 bit encryption' to make this more secure.
4. Now go ahead and create your first site collection for this web app. MOSS will automatically create a new site collection for you and present you with a "https://.." link upon completion. You should now have a SSL ready web app.
5. By default, if you want multiple web apps using SSL on the same server - this does not work in IIS 6. If you want multiple MOSS 2007 Web apps to be SSL enabled, there are two ways of going about this. One way is to get as many IPs as you want SSL web apps for that web server and assign one IP per host header settings for port 80 and 443 under IIS Website properties --> Home Directory --> Advanced. The other option is to modify the IIS metabase to allow multiple SSL web apps on the same IP. Be careful with the second option and make sure you know what you are doing.

Sunday, July 8, 2007

VPC running out of disk space

I have run into problems sometimes when my development VPC is low on hard drive space. By default, you get 16 GB of hard disk space on the VPC virtual disk. Recently I created a new VPC - installed MOSS 2007, SQL 2005, Office 2007, SharePoint designer and VSTS - and figured I would use this VPC for development around MOSS. Turns out that a few days after the install, a balloon popped up stating that the VPC was running out of space. I did not have many programs that I could get rid of, so I decided to confront the problem instead of delaying it.

I navigated to the Virtual PC console and clicked on settings for the currently running VPC. I clicked on the Virtual Disk Wizard and created a new disk with the default settings to be used as the Hard Disk 2 for this VPC - to get me more space. I shut off the VPC and assigned the Hard Disk 2 settings to use this new disk file. After restarting the VPC, I still did not see my new space on the system drive. So I navigated to Computer Management under Administrative Tools and clicked on Storage --> Disk management. That started a wizard where it asked me to initialize my new disk (if it does not automatically start the wizard, you can right click on the new disk and start it manually). I initialized my new disk and then right clicked on the disk again to format it. I chose the New Volume wizard to basically partition the drive. I chose the simple volume type on the next screen. On the next screen I selected the disk and set the disk size (used the defaults of 16GB) and clicked next. On the next screen, I assigned E: as the drive letter. The next screen presented me choices of formatting the volume or not. I chose to format the drive with NTFS as the file system and named the volume label as data. The next screen just showed me a summary of my choices and I said ok. A few minutes later it was done formatting the drive and I had an extra 16 GB of space :).

Tuesday, July 3, 2007

IIS 6 reset - class not registered

I was trying to reset iis using the iisreset command and it kept coming back with "Class not registered" error. Turns out that the program IISRSTAS.exe got unregistered. To register it again, run the following command from the console.

c:\windows\system32\inetsrv\iisrstas.exe /RegServer

That fixed it.