From 8fd7cd51e275e2733f3c0741f55e02ed2de9c0d3 Mon Sep 17 00:00:00 2001 From: YishaiGalatzer Date: Tue, 9 Sep 2014 08:39:44 -0700 Subject: [PATCH] Fix the sample to await when writing directly to the output stream in a controller. --- samples/MvcSample.Web/Home2Controller.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/MvcSample.Web/Home2Controller.cs b/samples/MvcSample.Web/Home2Controller.cs index 1c3a4e6c6c..b6f567172a 100644 --- a/samples/MvcSample.Web/Home2Controller.cs +++ b/samples/MvcSample.Web/Home2Controller.cs @@ -1,3 +1,4 @@ +using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc; using MvcSample.Web.Models; @@ -37,9 +38,9 @@ namespace MvcSample.Web.RandomNameSpace }; } - public void Raw() + public async Task Raw() { - Response.WriteAsync("Hello World raw"); + await Response.WriteAsync("Hello World raw"); } public ActionResult UserJson()