Click here to Skip to main content
11,415,074 members (62,614 online)
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 Sergey Alexandrovich Kryukov 9,200
1 OriginalGriff 7,512
2 Maciej Los 3,710
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web01 | 2.8.150427.4 | 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