From 3cab0940f99cbc7c41e377dd421efbe8f3b945e3 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Tue, 12 May 2015 16:44:17 -0400 Subject: [PATCH] Updated lauchsettings for web and kestrel Added links to welcome page and exception from home page --- .../src/DiagDemo/Properties/launchSettings.json | 12 ++++++++++++ .../diagnostics/sample/src/DiagDemo/Startup.cs | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/fundamentals/diagnostics/sample/src/DiagDemo/Properties/launchSettings.json b/docs/fundamentals/diagnostics/sample/src/DiagDemo/Properties/launchSettings.json index 7d05960f2161..75bd5fe4c1aa 100644 --- a/docs/fundamentals/diagnostics/sample/src/DiagDemo/Properties/launchSettings.json +++ b/docs/fundamentals/diagnostics/sample/src/DiagDemo/Properties/launchSettings.json @@ -6,6 +6,18 @@ "environmentVariables": { "ASPNET_ENV": "Development" } + }, + "kestrel": { + "commandName": "kestrel", + "environmentVariables": { + "ASPNET_ENV": "Development" + } + }, + "web": { + "commandName": "web", + "environmentVariables": { + "ASPNET_ENV": "Development" + } } } } \ No newline at end of file diff --git a/docs/fundamentals/diagnostics/sample/src/DiagDemo/Startup.cs b/docs/fundamentals/diagnostics/sample/src/DiagDemo/Startup.cs index a6fe6e117797..79b4ae697c1e 100644 --- a/docs/fundamentals/diagnostics/sample/src/DiagDemo/Startup.cs +++ b/docs/fundamentals/diagnostics/sample/src/DiagDemo/Startup.cs @@ -34,7 +34,13 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) app.Run(async (context) => { if(context.Request.Query.ContainsKey("throw")) throw new Exception("Exception triggered!"); - await context.Response.WriteAsync("Hello World!"); + context.Response.ContentType = "text/html"; + await context.Response.WriteAsync("Hello World!"); + await context.Response.WriteAsync(""); + await context.Response.WriteAsync(""); }); } }