Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Custom HTTP Module help

Reply
Thread Tools

Custom HTTP Module help

 
 
spartanNTX
Guest
Posts: n/a
 
      11-13-2003
Hello,
I am trying to create a custom HTTP module implementing
the IHttpModule interface. 1 event handler in the module
does not get passed the HttpApplication as an argument
when it is called. I need to Response.Redirect the user
after this event has taken place and I can not find a way
to access the Response object.
I have tried setting a class member variable equal to
the httpapplication object in the init method and also I
have tried creating a new HttpApplication() object but
neither seems to have any effect. Does anyone please have
any suggestions? Here are the two things I have tried:


private HttpApplication currentContext;//set in init()

public void CmsPosting_Approved( Object sender,
ChangedEventArgs e )
{
currentContext.Response.Redirect
("http://www.google.com",true);
}
//not working

//and

public void CmsPosting_Approved( Object sender,
ChangedEventArgs e )
{
HttpApplication app = new HttpApplication();
app.Response.Redirect("http://www.google.com",true);
}
//not working

The (PostingEvents)sender and (ChangedEventArgs)e object
don't contain any usefull methods or properties.

TIA!!!!!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
Question about Custom HTTP Module, PNG Images, and aspnet_isapi.dll toddmatson@gmail.com ASP .Net 1 12-29-2008 04:41 AM
Handling Application.Start via Custom HTTP Module Cramer ASP .Net 0 04-23-2008 07:55 AM
Re: Http Module Problem: not all requests hit my module why? Jiong Feng ASP .Net 2 11-29-2003 05:14 PM
Adding custom server variables from http module Cybermedia Marketing ASP .Net 0 10-15-2003 06:51 PM



Advertisments