L
Lloyd Dupont
In a C# Web Control library I created this Page / HttpHandler:
================
namespace WebUtils
{
public class FTBImageGallery : Page
{
public override void ProcessRequest(HttpContext context)
{
base.ProcessRequest(context);
}
protected override void CreateChildControls()
{
Button but = new Button();
but.Text = "Hello
";
but.ID = "myButton";
Controls.Add(but);
}
}
}
================
in a web project using this library I wrote this http handler
================
<%@ WebHandler Language="C#" Class="IGallery" %>
using System;
using System.Web;
using WebUtils;
public class IGallery : FTBImageGallery
{
}
================
When I try to query this HttpHandler I get the following error when calling base.ProcessRequest(context)
================
System.Web.HttpUnhandledException was unhandled by user code
Message="Exception of type 'System.Web.HttpUnhandledException' was thrown."
Source="System.Web"
ErrorCode=-2147467259
StackTrace:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at WebUtils.FTBImageGallery.ProcessRequest(HttpContext context) in F:\MyWork\WebLibrary\WebUtils\WebUtils\FTBImageGallery.cs:line 19
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
================
Any idea of what could have gone wrong?
================
namespace WebUtils
{
public class FTBImageGallery : Page
{
public override void ProcessRequest(HttpContext context)
{
base.ProcessRequest(context);
}
protected override void CreateChildControls()
{
Button but = new Button();
but.Text = "Hello
but.ID = "myButton";
Controls.Add(but);
}
}
}
================
in a web project using this library I wrote this http handler
================
<%@ WebHandler Language="C#" Class="IGallery" %>
using System;
using System.Web;
using WebUtils;
public class IGallery : FTBImageGallery
{
}
================
When I try to query this HttpHandler I get the following error when calling base.ProcessRequest(context)
================
System.Web.HttpUnhandledException was unhandled by user code
Message="Exception of type 'System.Web.HttpUnhandledException' was thrown."
Source="System.Web"
ErrorCode=-2147467259
StackTrace:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at WebUtils.FTBImageGallery.ProcessRequest(HttpContext context) in F:\MyWork\WebLibrary\WebUtils\WebUtils\FTBImageGallery.cs:line 19
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
================
Any idea of what could have gone wrong?