Skip to content

Commit

Permalink
Updated lauchsettings for web and kestrel
Browse files Browse the repository at this point in the history
Added links to welcome page and exception from home page
  • Loading branch information
ardalis committed May 12, 2015
1 parent 40194d3 commit 3cab094
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
"environmentVariables": {
"ASPNET_ENV": "Development"
}
},
"kestrel": {
"commandName": "kestrel",
"environmentVariables": {
"ASPNET_ENV": "Development"
}
},
"web": {
"commandName": "web",
"environmentVariables": {
"ASPNET_ENV": "Development"
}
}
}
}
8 changes: 7 additions & 1 deletion docs/fundamentals/diagnostics/sample/src/DiagDemo/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("<html><body>Hello World!");
await context.Response.WriteAsync("<ul>");
await context.Response.WriteAsync("<li><a href=\"/welcome\">Welcome Page</a></li>");
await context.Response.WriteAsync("<li><a href=\"/?throw=true\">Throw Exception</a></li>");
await context.Response.WriteAsync("</ul>");
await context.Response.WriteAsync("</body></html>");
});
}
}
Expand Down

0 comments on commit 3cab094

Please sign in to comment.