Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asynchronous HttpHandlers and WriteAsync

I've been experimenting with some code code on Ayende Rahien's blog here which demonstrates using asynchronous HttpHandlers to improve the number of requests that can be processed concurrently.

Unfortunately I can get even the basic example to work. I'm getting the following error:

'System.IO.TextWriter' does not contain a definition for 'WriteAsync' and no extension method 'WriteAsync' accepting a first argument of type 'System.IO.TextWriter' could be found (are you missing a using directive or an assembly reference?)

for the line.

return context.Response.Output.WriteAsync("Hello World!");

I would imagine the method is an extension method added in net4 as part of the Parallel Extensions however for the life of me I can find the correct namespace.

Wouls any of you hardcore csharpers please shed the light.

like image 910
James South Avatar asked Feb 20 '26 12:02

James South


1 Answers

Check out and http://msdn.microsoft.com/en-us/vstudio/async.aspx (under update 1) http://www.hanselman.com/blog/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx

Might set you on the right line

like image 129
Alex H Avatar answered Feb 23 '26 01:02

Alex H