This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

When you try to run the Registration wizard of the K2 for SharePoint App after the K2 Five update, the "SharePoint Service Broker" step raises the following error:

"The URI prefix is not recognized"

Symptoms

The following error is recorded in the HostServer Logs:

"6833954","2018-01-26 09:26:07","Error","SmartObjects","10702","Error","SourceCode.SmartObjects.ServiceBroker [ExecuteSmartObject]",

"10702 An error occurred in the SharePointIntegration Service Instance. System.NotSupportedException: The URI prefix is not recognized.
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at SourceCode.SmartObjects.Services.SharePoint15.Common.Helpers.ConfigHelper.

GetSPSiteInfo(String siteUrl)
at SourceCode.SmartObjects.Services.SharePoint.Integration.Execution.Execute.

UpdateTenantManagementSmartObjects(ServiceInstance Service)
at SourceCode.SmartObjects.Services.SharePoint.Integration.IntegrationService.Execute()",

"anonymous","0.0.0.0",

"ACDC01VMS195:C:\Program Files (x86)\K2 blackpearl\Host Server\Bin","6833954","99145c48221e495d99234bb572125df6",""

SmartObject logs contains records similar to the ones below:

  1. Brokerpackagein.log:

<brokerpackage>
<smartobject name="SharePoint_Integration_Workflow_Helper_Methods" guid="f343a8d0-c7c6-4ad1-b72d-07ed5b568c46" version="3"

resultname="Primary_f343a8d0-c7c6-4ad1-b72d-07ed5b568c46_f343a8d0-c7c6-4ad1-b72d-07ed5b568c46">
<property name="k2_Int_K2_App_Settings_Site_URL">
<value>https://portal.denallix.com/appcat</value>
</property>
<property name="k2_Int_K2_App_Site_URL">
<value>https://app-aefed8abba5ce2.apps.denallix.com/appcat/K2forSharePoint</value>
</property>
<method name="UpdateTenantManagementSmartObjects" />
</smartobject>
</brokerpackage>

2. Brokerpackageout.log:

<brokerpackage>
<result successful="false">
<serviceinstances>
<serviceinstance name="SharePointIntegration" guid="71810da1-81e2-4f22-8cf2-4011dacfdf42">
<messages>
<message severity="Error">The URI prefix is not recognized.</message>
</messages>
</serviceinstance>
</serviceinstances>
</result>
</brokerpackage>
</brokerpackage>

Troubleshooting Steps

This occurs as a result of incorrect key value stored in the K2 database for AppSiteURL and AppCatSiteURL type. An example of that is something like "urn:SharePoint:denallix", instead of the actual SharePoint URL or GUID. These invalid records will have to be deleted and after this K2 for SharePoint registration should complete successfully.

Please log a support ticket and request the debug assembly which should help identify the incorrect values.

Important! Direct K2 database modification is not suppported, unless directed to do so by K2 support.