/usr/share/asp.net-demos/1.1/handlers/async.ashx is in asp.net-examples 4.2-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | <%@ WebHandler Language="c#" class="XSPTest.AsyncTest" debug="true" %>
using System;
using System.Web;
using System.Threading;
namespace XSPTest
{
public class AsyncTest : IHttpAsyncHandler
{
EventHandler evt;
HttpContext context;
void Func (object o, EventArgs args)
{
context.Response.Write ("In async callback\n");
context.Response.ContentType = "text/plain";
}
public void ProcessRequest (HttpContext context)
{
throw new Exception ("Should not be called");
}
public IAsyncResult BeginProcessRequest (HttpContext context, AsyncCallback cb, object state)
{
this.context = context;
evt = new EventHandler (Func);
return evt.BeginInvoke (null, null, cb, state);
}
public void EndProcessRequest (IAsyncResult ares)
{
context.Response.Write ("End request being invoked.");
}
public bool IsReusable {
get { return false; }
}
}
}
|