public K2Connection(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling) { _sessionManager = serverMarshaling.GetSessionManagerContext(); var sessionCookie = SessionManager.CurrentSessionCookie; _sessionConnectionString = ServiceBroker.SecurityManager.GetSessionConnectionString(sessionCookie); }
public void Init(IServiceMarshalling ServiceMarshalling, IServerMarshaling ServerMarshaling) { //Initialize resources when Host Server starts up. This gets called when Authentication and RoleProvider //gets instantiated when HostServer starts up. _cfgMgr = ServiceMarshalling.GetConfigurationManagerContext(); _securityManager = ServerMarshaling.GetSecurityManagerContext(); }
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); }
public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling) { lock (syncobject) { if (SecurityManager == null) { SecurityManager = serverMarshaling.GetSecurityManagerContext(); } K2Connection = new K2Connection(serviceMarshalling, serverMarshaling); } }
public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling) { lock (syncobject) { if (K2Connection == null) { K2Connection = new K2Connection(serviceMarshalling, serverMarshaling); } if (IdentityService == null) { IdentityService = serviceMarshalling.GetHostedService(typeof(IIdentityService)) as IIdentityService; } } }
public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling) { lock (syncobject) { if (HostServiceLogger == null) { HostServiceLogger = new Logger(serviceMarshalling.GetHostedService(typeof(SourceCode.Logging.ILogger)) as SourceCode.Logging.ILogger); HostServiceLogger.LogDebug("Logger loaded from ServiceMarshalling"); } if (IdentityService == null) { IdentityService = serviceMarshalling.GetHostedService(typeof(IIdentityService)) as IIdentityService; } if (SecurityManager == null) { SecurityManager = serverMarshaling.GetSecurityManagerContext(); } } }
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); }
/// <summary> /// /// </summary> /// <param name="serviceMarshalling"></param> /// <param name="serverMarshaling"></param> public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling) { Trace.WriteLine(string.Format("XmlRoleProvider.IHostableType.Init")); }
public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling) { lock (syncobject) { //if (Logger == null) //{ // Logger = new Logger(serviceMarshalling.GetHostedService(typeof(SourceCode.Logging.ILogger)) as SourceCode.Logging.ILogger); // Logger.LogDebug("Logger loaded from ServiceMarshalling"); //} if (IdentityService == null) { IdentityService = serviceMarshalling.GetHostedService(typeof(IIdentityService)) as IIdentityService; } if (SecurityManager == null) { SecurityManager = serverMarshaling.GetSecurityManagerContext(); } } }
/// <summary> /// Initializes the security provider. /// </summary> /// <param name="ServiceMarshalling">An IServiceMarshalling representing the service marshaling.</param> /// <param name="ServerMarshaling">An IServerMarshaling representing the server marshaling.</param> public void Init(IServiceMarshalling ServiceMarshalling, IServerMarshaling ServerMarshaling) { // Get configuration manager from service marshaling. _configurationManager = ServiceMarshalling.GetConfigurationManagerContext(); // Get security manager from server marshaling. _securityManager = ServerMarshaling.GetSecurityManagerContext(); //set up logging this._logger = (Logger)ServiceMarshalling.GetHostedService(typeof(Logger).ToString()); }
void IHostableType.Init(IServiceMarshalling ServiceMarshalling, IServerMarshaling ServerMarshaling) { if (Logger.SelfLoaded == true) { string type = typeof(SourceCode.Logging.Logger).ToString(); if (ServiceMarshalling.IsServiceHosted(type)) { Logger = new Logger((SourceCode.Logging.Logger)ServiceMarshalling.GetHostedService(type)); Logger.LogDebug("Logger loaded from ServiceMarshalling"); } } }
public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling) { lock (syncobject) { if (Logger.SelfLoaded == true) { string type = typeof(SourceCode.Logging.Logger).ToString(); if (serviceMarshalling.IsServiceHosted(type)) { Logger = new Logger((SourceCode.Logging.Logger)serviceMarshalling.GetHostedService(type)); Logger.LogDebug("Logger loaded from ServiceMarshalling"); } } if (IdentityService == null) { IdentityService = serviceMarshalling.GetHostedService(typeof(IIdentityService)) as IIdentityService; } if (SecurityManager == null) { SecurityManager = serverMarshaling.GetSecurityManagerContext(); } } }