示例#1
0
        public K2Connection(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling)
        {
            _sessionManager = serverMarshaling.GetSessionManagerContext();
            var sessionCookie = SessionManager.CurrentSessionCookie;

            _sessionConnectionString = ServiceBroker.SecurityManager.GetSessionConnectionString(sessionCookie);
        }
 public K2Connection(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling)
 {
     if (string.IsNullOrEmpty(_workflowConnectionString) || _workflowConnectionPort == 0)
     {
         _workflowConnectionString = ConfigurationManager.ConnectionStrings["WorkflowServer"].ConnectionString;
     }
     _sessionManager = serverMarshaling.GetSessionManagerContext();
     var sessionCookie = SessionManager.CurrentSessionCookie;
     _sessionConnectionString = serverMarshaling.GetSecurityManagerContext().GetSessionConnectionString(sessionCookie);
 }
示例#3
0
        public K2Connection(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling)
        {
            // These values are static because they won't change on the server.
            // This code will only execute once after K2HostServer starts
            if (string.IsNullOrEmpty(defaultWorkflowServerConnectionString) || workflowServerPort == 0)
            {
                defaultWorkflowServerConnectionString = ConfigurationManager.ConnectionStrings["WorkflowServer"].ConnectionString;

                ConnectionSetup workflowConnectionSetup = new ConnectionSetup();
                workflowConnectionSetup.ParseConnectionString(defaultWorkflowServerConnectionString);

                workflowServerPort = int.Parse(workflowConnectionSetup.ConnectionParameters[SourceCode.Workflow.Client.ConnectionSetup.ParamKeys.Port]);
            }

            sessionManager = serverMarshaling.GetSessionManagerContext();

            var sessionCookie = SessionManager.CurrentSessionCookie;

            sessionConnectionString = K2NEServiceBroker.SecurityManager.GetSessionConnectionString(sessionCookie);
        }