Symptoms
"Token contains invalid signature" error when registering K2 for SharePoint App with new K2 development server
Diagnoses
I've been working with a couple of folks on the migration of K2 objects from our current (problematic) development server to our new development server. All of the objects have been successfully deployed using the Package and Deployment server. The DNS was recently updated so that the URL https://k2.denallix.com (A CNAME record) is now being directed to the new box. We can bring up Workspace and Designer with no problems but when we try and register the K2 App for SharePoint we get the following error..
VALIDATIONThe remote server returned an error: (401) Unauthorized.Failed to initialize the Context: URL: https://portal.denallix.com/support/it Username: Error Details: Method: SharePointService.initializeContext x-ms-diagnostics : 3000006reason="Token contains invalid signature."category="invalid_client" SPRequestGuid : 82efff9c-b2cf-c05f-c388-10f6daf6be78
•Type: SourceCode.SmartObjects.Client.SmartObjectException
•Source: SourceCode.SmartObjects.Client
•Method Base
?Member Type: Method
?Name: ExecuteScalar
?Module
?Scope Name: SourceCode.SmartObjects.Client.dll
?Declaring Type
?Full Name: SourceCode.SmartObjects.Client.SmartObjectClientServer
•Stack Trace:
at SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteScalar(SmartObject smartObject, DataTable inputTable)
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)
I have emptied the browser cache on the local machine and on the servers that are connecting to Stono and I have also updated the DNS cache on all the applicable boxes--error still persists.
Resolution
Re-running the app deployment executable on the Sharepoint server resolved the issue.