Blog Stats
  • Posts - 13
  • Articles - 0
  • Comments - 47
  • Trackbacks - 23

 

Friday, December 23, 2005

Invalid operation exception when installing Windows Sharepoint Services (WSS) v3 Beta 1

Here's a post I had to hold back until we got the OK to blog about office 12:

 

So I finally had a chance to install WSS v3 Beta 1 tonight. After rushing home to install the new beta bits on a brand spanking new virtual machine I was let down to find that the installation failed to complete successfully. Seems that there was an unhandled exception in Step 3 of the WSS configuration process after WSS installs. Technically it is the step where the SPDiagnosticService is being configured (go figure). I tried doing some quick google searches and looking into the installation docs but no such luck finding the solution to my problem. I decided in was time again to crack open .NET reflector to see what was going on. Here is what I found:

During the configuration process, the SPDiagnoticService step attempts to configure the DACL of a particular registry key found at HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS

The code that is being executed looks something like this:

key1 = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS");

try

{

RegistrySecurity security2 = key1.GetAccessControl();

RegistryAccessRule rule = new RegistryAccessRule("Administrator", RegistryRights.ExecuteKey | (RegistryRights.CreateSubKey | RegistryRights.SetValue), InheritanceFlags.ObjectInherit | InheritanceFlags.ContainerInherit, PropagationFlags.None, AccessControlType.Allow);

security2.SetAccessRule(rule);

key1.SetAccessControl(security2);

return;

}

finally

{

if (key1 != null)

{

((IDisposable)key1).Dispose();

}

}

 

So my first thought was that the process did not have the permissions to modify the registry, but when I tried to access the permission on the registry key in question I got a message from windows saying the DACL was in non-canonical form! Looks like during the installation process, the ACES in that DACL are added in the worng order! So to fix this issue, perform the following installation steps...

  1. Install the OS
  2. Install SQL 2005 (if you don't want to install MSDE)
  3. Install WWFx 1.2 beta
  4. Install WSS v3 beta 1
  5. There is two phases exectued during the installation of WSS. The first phase will install the bits. The second phase configures the server. The key to this is making sure you install WSS but DO NOT configure WSS until you perform the next step
  6. Open regedit. Navigate to HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS   Open up the permissions tab. When prompted by windows, allow it to repair the DACL to put it into canonical form
  7. Close regit and proceed with the configuration of WSS

I don't know what exactly caused the registry key DACL to become non-canonical, but this seemed to fix the issue. I want to also note that when installing Sharepoint Server 12, this problem doesn't seem to manifest itself.

If you have run across this problem yourself, I hope this post helped!

 

 

Copyright © Tom Wisnowski