T
tshad
I am trying to get an HttpHandler I found on the Web to work. It is called
FreeText. It allows fancy handling of a Textbox.
This program is just a dll that you set up as an HttpHandler:
<httpHandlers>
<add verb="GET"
path="FtbWebResource.axd"
type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox"
/>
</httpHandlers>
This program works fine as long as I don't add a rudimentary HttpModule. I
found out it doesn't work if I have a module called ScrollKeeper installed.
I get an error:
Problems with this Web Page might prevent it from being displayed
properly.
Then I found that it had nothing to do with that program. I could make it
fail if I just added a basic module of my own.
***************************************************************
using System;
using System.Web;
namespace HttpModuleExamples
{
public class CustomHttpModule : IHttpModule
{
//IHttpModule Members
public void Init(HttpApplication httpApp)
{
httpApp.EndRequest += new EventHandler(this.OnEndRequest);
}
public void Dispose()
{
//Usually nothing has to happen here
}
// Event Handlers
public void OnEndRequest(object o, EventArgs ea)
{
HttpApplication httpApp = (HttpApplication) o;
HttpContext ctx = HttpContext.Current;
ctx.Response.Write("<br>Ending Request <br>");
}
}
}
**************************************************************
My Web.Config entry:
<httpModules>
<add type="HttpModuleExamples.CustomHttpModule, HttpModules"
name="CustomHttpModule" />
</httpModules>
If I take out the "ctx.Response.Write" line, it works fine.
Why would that affect the other dll?
Thanks,
Tom
FreeText. It allows fancy handling of a Textbox.
This program is just a dll that you set up as an HttpHandler:
<httpHandlers>
<add verb="GET"
path="FtbWebResource.axd"
type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox"
/>
</httpHandlers>
This program works fine as long as I don't add a rudimentary HttpModule. I
found out it doesn't work if I have a module called ScrollKeeper installed.
I get an error:
Problems with this Web Page might prevent it from being displayed
properly.
Then I found that it had nothing to do with that program. I could make it
fail if I just added a basic module of my own.
***************************************************************
using System;
using System.Web;
namespace HttpModuleExamples
{
public class CustomHttpModule : IHttpModule
{
//IHttpModule Members
public void Init(HttpApplication httpApp)
{
httpApp.EndRequest += new EventHandler(this.OnEndRequest);
}
public void Dispose()
{
//Usually nothing has to happen here
}
// Event Handlers
public void OnEndRequest(object o, EventArgs ea)
{
HttpApplication httpApp = (HttpApplication) o;
HttpContext ctx = HttpContext.Current;
ctx.Response.Write("<br>Ending Request <br>");
}
}
}
**************************************************************
My Web.Config entry:
<httpModules>
<add type="HttpModuleExamples.CustomHttpModule, HttpModules"
name="CustomHttpModule" />
</httpModules>
If I take out the "ctx.Response.Write" line, it works fine.
Why would that affect the other dll?
Thanks,
Tom