Exemplo n.º 1
0
 public ActionResult Diagnostics()
 {
     if (Request.IsLocal)
     {
         var verifier = new DiagnosticReporter();
         return(Content(verifier.GetVerificationReport(), "text/plain", Encoding.UTF8));
     }
     else
     {
         return(Content("You can only run the diagnostics locally to the server"));
     }
 }
Exemplo n.º 2
0
 public ActionResult Diagnostics()
 {
     if (Url.IsLocalUrl(Request.GetEncodedUrl()))
     {
         var verifier = new DiagnosticReporter(HttpContext.RequestServices.GetService <IHostingEnvironment>());
         return(Content(verifier.GetVerificationReport(HttpContext.RequestServices), "text/plain", Encoding.UTF8));
     }
     else
     {
         return(Content("You can only run the diagnostics locally to the server"));
     }
 }