Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0 .NET4
i have created two classes
public class ClshttpModule:IHttpModule
{
    private HttpApplication httpapp;
    public static ArrayList objarlist = new ArrayList();
 
    public ClshttpModule()
    {
      }
    public void Dispose()
    {
 
    }
 
    public void Init(HttpApplication context)
    {
        this.httpapp = context;
        httpapp.Context.Response.Clear();
        objarlist.Clear();
        objarlist.Add("httpModule:init");
        httpapp.AuthenticateRequest += new EventHandler(OnAuthentication);
        httpapp.AuthenticateRequest += new EventHandler(OnAuthorization);
        httpapp.BeginRequest += new EventHandler(OnBeginrequest);
        httpapp.EndRequest += new EventHandler(OnEndrequest);
        httpapp.ResolveRequestCache += new EventHandler(OnResolveRequestCache);
        httpapp.AcquireRequestState += new EventHandler(OnAcquireRequest);
        httpapp.PreRequestHandlerExecute += new EventHandler(PreRequestHandlerExecute);
        httpapp.PostRequestHandlerExecute += new EventHandler(PostRequestHandlerExecute);
        httpapp.ReleaseRequestState += new EventHandler(ReleaseRequestState);
        httpapp.UpdateRequestCache += new EventHandler(UpdateRequestCachee);
            }
 
    void UpdateRequestCachee(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void ReleaseRequestState(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void PostRequestHandlerExecute(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void PreRequestHandlerExecute(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void PreRequestHandlerExecuteOnAcquireRequest(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void OnAcquireRequest(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void OnResolveRequestCache(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void OnEndrequest(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void OnBeginrequest(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void OnAuthorization(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
    void OnAuthentication(object sender, EventArgs e)
    {
        objarlist.Add("httpModule:OnupdateCache");
 
    }
 
}
 
in default.aspx
 
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
       <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
       <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
           ControlToValidate="TextBox1" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
 

web.config
<httpModules>
            <add name="ClshttpModule"  type="ClshttpModule"/>
 
        </httpModules>
        <httpHandlers>
            <add verb="*" path="*.jpg" type="clsHttpHandler"/>
        </httpHandlers>
 

 
I am not getting any outputt
 
pls tell regards
Posted 15-Jan-13 21:25pm
Comments
shivani 2013 at 18-Jan-13 8:00am
   
is there no one who could help me out of this..........

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Zoltán Zörgő 200
1 Sergey Alexandrovich Kryukov 160
2 Peter Leow 90
3 Ramza360 51
4 Arkadeep De 50
0 Zoltán Zörgő 80
1 the other paul 23
2 Shmuel Zang 10
3 Aarti Meswania 5
4 Member 11389991 -2


Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100