Skip to content

Instantly share code, notes, and snippets.

@tugberkugurlu
Created June 6, 2012 09:30
Show Gist options
  • Save tugberkugurlu/2880922 to your computer and use it in GitHub Desktop.
Save tugberkugurlu/2880922 to your computer and use it in GitHub Desktop.
public class HomeController : Controller {
public async Task<ActionResult> Index() {
HttpClient client = new HttpClient();
var result = await client.GetAsync("http://webapiasync.tugberk.me/api/cars");
doWork();
return View();
}
public void doWork() {
//Not null, runs perfectly fine
var httpCtx = System.Web.HttpContext.Current;
Trace.TraceInformation("doWork is running...");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment