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

The following error appears when you try to create a new package, edit package and deploy package on the K2 Package and Deployment tool: 

Primary Credentials Not Authenticated. Session Not Authenticated

Symptoms

The issue can be caused by an incorrect password for the K2SQL account set in the HostServer and WorkflowServer database connection strings.

Troubleshooting Steps

Please follow these steps to resolve the issue: 

1. Copy the K2HostServer.exe.config from "\K2 blackpearl\Host Server\Bin" to "C:\Temp". Create a Temp folder in C-drive beforehand.

2. Rename the config file to web.config.

3. Open a command prompt and change the directory to "C:\Windows\Microsoft.NET\Framework\v2.0.50727".

4. Run this command:

> aspnet_regiis -pdf "connectionStrings" C:\Temp

5. Open the web.config in "C:\Temp"

6. Locate the following strings under the <connectionStrings> section and change the password accordingly: 

<add name="HostServer" connectionString="Integrated=False;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=Fals 
e;Host=BLACKPEARL;Port=5555;UserID=Admin;Password=k2pass;SecurityLabelName=K2SQL;AuthData=1" />

<add name="WorkflowServer" connectionString="Integrated=False;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=Fals 
e;Host=BLACKPEARL;Port=5555;UserID=Admin;Password=k2pass;SecurityLabelName=K2SQL;AuthData=1" />


7. Save the file.

8. Rename web.config to K2HostServer.exe.config and replace the current config file in "\K2 blackpearl\Host Server\Bin".

9. Restart the K2 Service.