public override void ExecuteResult(ControllerContext context)
{
var factory = new ErrorLogPageFactory();
if (!string.IsNullOrEmpty(_resouceType))
{
var pathInfo = "/" + _resouceType;
context.HttpContext.RewritePath(FilePath(context), pathInfo,
context.HttpContext.Request.QueryString.ToString());
}
var currentApplication = (HttpApplication) context.HttpContext.GetService(typeof (HttpApplication));
if (currentApplication == null)
return;
var currentContext = currentApplication.Context;
var httpHandler = factory.GetHandler(currentContext, null, null, null);
var handler = httpHandler as IHttpAsyncHandler;
if (handler != null)
{
var asyncHttpHandler = handler;
asyncHttpHandler.BeginProcessRequest(currentContext, (r) => { }, null);
}
else
{
if (httpHandler != null)
httpHandler.ProcessRequest(currentContext);
}
}