// // GET: /User/ public ActionResult ShowHome() { IPrincipal userAdapter = new PrincipalUserAdapter("ae"); HttpContext.User = userAdapter; Thread.CurrentPrincipal = userAdapter; IDefinitionSessionLocal definitionComponent = null; IExecutionSessionLocal executionComponent = null; try { definitionComponent = ServiceLocator.Instance.GetService(typeof(IDefinitionSessionLocal)) as IDefinitionSessionLocal; executionComponent = ServiceLocator.Instance.GetService(typeof(IExecutionSessionLocal)) as IExecutionSessionLocal; IList taskList = executionComponent.GetTaskList(); IList processDefinitions = definitionComponent.GetProcessDefinitions(); ViewData["taskList"] = taskList; ViewData["processDefinitions"] = processDefinitions; ViewData["preview"] = null; //Context.Flash["taskList"] = taskList; //Context.Flash["processDefinitions"] = processDefinitions; //Context.Flash["preview"] = preview; } finally { ServiceLocator.Instance.Release(executionComponent); ServiceLocator.Instance.Release(definitionComponent); } return View(); }
private void InitSession(string username) { IPrincipal userAdapter=new PrincipalUserAdapter("ae"); Session["user"] = userAdapter; HttpContext.User = userAdapter; }
private void InitSession(string username) { IPrincipal userAdapter=new PrincipalUserAdapter(username); Context.Session["user"] = userAdapter; Context.CurrentUser=userAdapter; }