473,408 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

HttpModule causing HttpHandler not to work

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
Mar 1 '06 #1
0 864

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter Rilling | last post by:
Can an HttpHandler or HttpModule be invoked on non-ASP.NET pages such as images or ASP or HTML pages? Can I trap a request for those pages? If not, how might I trap those requests?
0
by: Bruce B | last post by:
Hi group, I'm experiencing some extreme weirdness over the last week with IIS related to it's Mappings and how .NET is behaving. I can't explain the behavior as it seems very random. Our...
3
by: Michael Iantosca | last post by:
I have a custom attribute that I attach to certain pages in my application and I want to inspect each page request as it is made to see if the custom attribute is attached to the underlying page...
3
by: MWells | last post by:
I'm having an issue getting my HttpHandlers and HttpModules to play together nicely. My HttpHandlers take special document types (defined by extension) and process them specially. I might have...
0
by: Mike Schilling | last post by:
(I've asked this on the C# newsgroup; I'm hoping someone over here might have an idea.) We have a C# application running under ASP.NET. It wasn't written using any VS.NET magic; all of the call...
0
by: tshad | last post by:
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: ...
1
by: Max | last post by:
I have my HTTPModule or HTTPHandler registered to process all file types (*). I have IIS configured to pass all requests to ASP.NET for this virtual directory. In some cases depending on the...
2
by: Roshawn | last post by:
Hi, I've been fighting tooth and nail trying to handle clunky viewstate data. I happened to find some code that moves this data to the bottom of the page (to enhance spidering, of course). ...
3
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi, I need to write asynchronous HTTPModule which will sometimes execute long job. I've written it using AddOnBeginRequestAsync but it still executes synchronously - I am checking performance...
3
by: Guzeppi | last post by:
if i want to create a redirection service, i.e. requests on a certain url are redirected to other urls depending on the querystring parameters in the request, what is best to use in this case...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.