public ActionResult InitializeEnvironment(string id, string registration) { this.id = id; try { var settings = GetData <FederationSettings>(registration); environmentTasks.ConfigureEnvironment(id, settings); } catch (Exception ex) { ex.Log(); return(new HttpStatusCodeResult(500, ex.Message)); } return(new HttpStatusCodeResult(200, "OK")); }
public HttpResponseMessage InitializeEnvironment(string id, [FromBody] FederationSettings registration) { this.id = id; try { var settings = registration; environmentTasks.ConfigureEnvironment(id, settings); } catch (Exception ex) { ex.Log(); return(Request.CreateResponse(HttpStatusCode.InternalServerError, string.Format("Error: {0}", ex.Message))); } return(Request.CreateResponse(HttpStatusCode.OK, "OK")); }