Running "Manage Site Realms" system form returns "Specified cast is not valid"

  • 26 February 2016
  • 0 replies

Badge +9




The following error was thrown when trying to set up Manage Site Realms in K2 for ADFS configuration

Specified cast is not valid.

•Type: SourceCode.SmartObjects.Client.SmartObjectException

•Source: SourceCode.SmartObjects.Client

•Method Base
◦Member Type: Method

◦Name: GetSmartObjectReader

◾Scope Name: SourceCode.SmartObjects.Client.dll

◦Declaring Type
◾Full Name: SourceCode.SmartObjects.Client.SmartObjectClientServer

•Stack Trace:
at SourceCode.SmartObjects.Client.SmartObjectClientServer.GetSmartObjectReader(SmartObject smartObject, ExecuteListReaderOptions options, Dictionary`2and propertyReference)

at SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteListReader(SmartObject smartObject, ExecuteListReaderOptions options)

at SourceCode.Forms.AppFramework.FormsApiToXml.ToXmlList()

at SourceCode.Forms.AppFramework.FormRuntime.SmartObjectExecution(XPathNavigator nav, Boolean outputDependencies, SmartObjectClientServer svr)

at SourceCode.Forms.AppFramework.FormRuntime.WorkXmlToApi(String xml)

at SourceCode.Forms.Runtime.AJAXCall.ProcessRequest(HttpContext context)





A check of the claims tables in the db revealed that the realms needed had not been configured with issuers. This script will show the claims tables.

SELECT * FROM [K2].[Identity].[ClaimAudience]
SELECT * FROM [K2].[Identity].[ClaimIssuer]
SELECT * FROM [K2].[Identity].[ClaimRealm]
SELECT * FROM [K2].[Identity].[ClaimRealmIssuer]
SELECT * FROM [K2].[Identity].[ClaimTypeMap]
SELECT * FROM [K2].[Identity].[ClaimTypeMapping]




The solution requires direct manipulation of the K2 db. Please contact K2 support.




0 replies

Be the first to reply!