- Timestamp:
- 12/17/12 09:37:16 (12 years ago)
- Location:
- branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs
r8545 r9062 22 22 23 23 public T withControllerService<T>(ControllerServiceDelegate<T> del) { 24 if (Session["pw"] == null) 25 Response.Redirect("/Account/Logon"); 26 24 27 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) { 25 28 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>(); … … 32 35 33 36 public void withControllerService(ControllerServiceDelegate del) { 34 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) { 37 if (Session["pw"] == null) 38 Response.Redirect("/Account/Logon"); 39 40 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) { 35 41 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>(); 36 42 credentialBehaviour.UserName.UserName = Membership.GetUser().UserName; 37 credentialBehaviour.UserName.Password = Session["pw"] as string; 43 credentialBehaviour.UserName.Password = Session["pw"] as string; 38 44 var controllerProxy = cf.CreateChannel(); 39 45 del(controllerProxy); … … 73 79 }); 74 80 JobDetailsModel jdm = new JobDetailsModel() { Job = job, Runs = runs }; 81 Session["jobDetails"] = jdm; 75 82 return View(jdm); 76 83 }
Note: See TracChangeset
for help on using the changeset viewer.