Symptoms
We are getting below error while trying to deploy the packages in the staging server.
Below is the Error log shown.
Primary Credentials Not Authenticated
at SourceCode.EnvironmentSettings.Client.EnvironmentSettingsManager.InitializeSettingsManager(Boolean connectToServer)
at SourceCode.Workflow.Design.Mail.MailEventItem.GetEnvironmentSmartObjectServer(IServiceProvider provider)
at SourceCode.Workflow.Design.Mail.MailEventItem.get_Server()
at SourceCode.Workflow.Design.Mail.MailEventItem.PrepareConfigurationForBuild()
at SourceCode.Workflow.Authoring.Design.Serialization.ExecutableItemCodeGenerator.ExtenderCodeGenerator.Generate(CodeTypeDeclarationCollection types, GenerationOptions options)
at SourceCode.Workflow.Authoring.Design.Serialization.ProcessCodeGenerator.Generate(GenerationOptions options)
at SourceCode.Workflow.Authoring.Process.OnLoad(ISerializationInfo content)
at SourceCode.Framework.SerializationInfo2.Load(PersistableObject instance, XmlReader reader)
at SourceCode.Framework.SerializationInfoProvider.Load(PersistableObject instance, XmlReader reader)
at SourceCode.Workflow.Authoring.Process.Load(XmlReader reader, String fileName)
at SourceCode.Workflow.Authoring.Process.Load(String fileName)
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.DeployWorker(Object param)
--- End of inner exception stack trace ---
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.Deploy(Stringg] parts, String kprojDir, String kprojName, String kprxDir, String kprxName, String targetFramework, IEnumerable`1 refs)
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.IsolatedDeploy(Action`1 data, ComplexType ct, IEnumerable`1 refs, String sessionCookie, ISecurityManager securityManager)
at SourceCode.Runtime.Services.Workflow.WorkflowDeploymentService.Deploy(IDeploymentContext context)
at SourceCode.Deployment.Runtime.ServerSession.BeginDeploy()
Diagnoses
There was no resolution for this bizarre issue although the Package is deployed to production it cannot be deployed to staging. we checked all the environment variables and string table values and config files and made sure that all is correct. we tried changing the connection string of the k2 server from K2 studio and changed it from the k2 PandD edit window with no use. we tried with different user credentials and from even added the staging server to the production PandD and tried to deploy from the production to the staging but failed. We opened the kprx file in k2 studio and tried deployment from there and this also failed. we ran repair from the K2 installation media and made sure the configuration analysis is green also this didnt work even with previously deployed packages. we tried also packaging from the production to the staging and deploying on staging and it didnt work.
Lastly the Respected customer installed the staging on a different environment and he resolved his issue.
Resolution
There was no resolution for this bizarre issue although the Package is deployed to production it cannot be deployed to staging. we checked all the environment variables and string table values and config files and made sure that all is correct. we tried changing the connection string of the k2 server from K2 studio and changed it from the k2 PandD edit window with no use. we tried with different user credentials and from even added the staging server to the production PandD and tried to deploy from the production to the staging but failed. We opened the kprx file in k2 studio and tried deployment from there and this also failed. we ran repair from the K2 installation media and made sure the configuration analysis is green also this didnt work even with previously deployed packages. we tried also packaging from the production to the staging and deploying on staging and it didnt work.
Lastly the Respected customer installed the staging on a different environment and he resolved his issue.