예제 #1
0
 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"));
 }
예제 #2
0
 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"));
 }