Skip to main content


 

Symptoms


I installed the K2 for SharePoint app today to one of the environments but came across the following strange error – see below.
The DB name of the customer is not K2, but K2Development.

And what is more interesting, everything works fine. I mean SmartObjects and Forms are created, opened and I even can save the data in SharePoint lists/libraries.

The error pops up as soon as you create a new List/Library in SharePoint and activate/register the K2 App on it. This doesn't happen after the second time around.

Have you ever come across this?

Error details:
Cannot open database "K2" requested by the login. The login failed. Login failed for user ‘DOMAINK2-Host'.
•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)

 

Diagnoses


It seems there is some wrong configuration regarding the connection strings in the K2HostServer.exe.config file
 

Resolution

After using a little utility to first decrypt the K2HostServer.exe.config file then checking the Connection Strings, we noticed that all the entries except one pointed to the "K2" database, which is wrong and should be pointing to "K2Development".

After updating all the entries to the correct string "K2Devlopment", saving and restarting the K2 Host Server, everything seems to be working now.




 
Be the first to reply!

Reply