Issue

If the K2 website uses an Environment Variable in its path, rather than a physical path, the installer will fail to resolve the location of the website's web.config file. For example: "%systemdrive%\inetpub\wwwroot" versus "C:\intetpub\wwwroot"

Symptoms

Upgrade from K2 Five to 5.1 fails, with errors. Config Analysis shows the error message: "The specified site Default Web Site is not a valid site" in multiple places.

The following errors were logged as part of the install:

Target failed to execute: K2 Site - Enable K2 Site Anon Auth
Target failed to execute: K2 Workspace - Disable K2 RuntimeServices Anon Auth (AD)
Target failed to execute: CreateWebApplication - SP15_WEB
Target failed to execute: K2 Site - Associate SmartObjectService to AppPool (Split)
Target failed to execute: K2 Site - Associate Report AppPool (Split)
Target failed to execute: K2 Site - Associate WorkflowService to AppPool (Split)
Target failed to execute: K2 Site - Associate WorkflowService V1 to AppPool (Split)
Target failed to execute: K2 Site - Associate Workspace to AppPool (Split Site, Split AppPools)
Target failed to execute: K2 Designer Website Preload Enabled
Target failed to execute: K2 Designer - K2 Workflow AppPool Association (Split)
Target failed to execute: K2 Site - Disable K2Api redirect
Target failed to execute: K2 Site - Disable K2Api redirect
Target failed to execute: K2 Site - Disable K2Api redirect

Installer Trace Logs show the underlying error message to be:

Process Output: ERROR ( message:Cannot find SITE object with identifier "Default Web Site".)

Resolution

To successfully upgrade from K2 Five to 5.1:

  1. Change the IIS site path from %systemdrive%\inetpub\wwwroot to the physical path (C:\intetpub\wwwroot)
  2. Run the following against the K2 DB to fix the site variables that were changed from 'Default Site':
    DECLARE @machine NVARCHAR(MAX)
    DECLARE @variableName NVARCHAR(MAX)
    DECLARE @newValue NVARCHAR(MAX)
    DECLARE @xml XML
    SET @machine = '[NetbiosSeverName]' -- replace with actual Netbios Server name
    SET @variableName = '[K2SITENAME]'
    SET @newValue = 'FQDN' -- replace with the FQDN of your K2 server name
  3. You may also need to run the K2 configuration utility.

In addition, this has been logged as a bug to be fixed in a subsequent release.