Summary

Using SharePoint Alternate Access Mappings (AAM) with the K2 for SharePoint application may not work as expected. Alternate access mappings allow you to provide different URLs for the same SharePoint site. The default zone is typically the first URL (but you can change the public URL for the default zone), and additional URLs are considered non-default zones. K2 activation, configuration, and design must always be done in the default zone. Other functionality, such as worklist, forms, and starting workflows with SharePoint events, work in non-default zones.

For more information see https://blogs.msdn.microsoft.com/sharepoint_strategery/2013/05/27/alternate-access-mappings-aams-explained/.

Errors that you may encounter in non-default zones that are not configured using the script below include:

Error 1: SmartObject with name GetK2ApplicationSettings not found. Please rerun the K2 for SharePoint application Registration Wizard as a Site Collection Administrator on the App Catalog. Navigate to Site Contents > K2 for SharePoint > Settings > Registration Wizard.
Image
Error 2: The Activation step fails during the configuration of K2 Server Settings, as shown here:
Image

Before you Begin

Before you begin, read and understand the following Microsoft articles:

Default Zone Requirement

You must perform all administration, configuration, and design using the Default Zone URL. This includes all pages hosted in the App Web associated with the K2 for SharePoint application. For example, https://app-54c495094d521.denallix.com, including the following pages:

  • Registration Wizard
  • Manage App Activations
  • Individual Site Activation
  • Site Contents > K2 for SharePoint
  • List/Library Ribbon > Application
  • List/Library Ribbon > Reports
  • List/Library Item > K2 Workflows

Non-default zone URLs are not blocked and may result in errors when accessing App Web pages. Furthermore, if you see additional SharePoint service types in your environment that you did not create and are based on non-default zones, you can ignore or remove them. These may appear when site activation is run on a non-default zone.

Enabling AAM URLs (Internal)

You must enable your additional URLs in non-default zones in order for K2 for SharePoint runtime functionality (Worklist, SmartForms, and Remote Event Receivers) to work on those zones.

  1. Run the following script in PowerShell. For more information about this script see Enable apps in AAM or host-header environments for SharePoint 2013:

Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction:SilentlyContinue
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentService.SupportMultipleAppDomains = $true
$contentService.Update()
iisreset
  1. Verify that K2 runtime works in the new zone URL.