HTTPModule and App_code ASP.NET 2.0

Discussion in 'ASP .Net' started by =?Utf-8?B?U2FtdWVs?=, Aug 6, 2005.

  1. nHi,

    is it possible to add pure code to APP_Code folder to act as an HTTPModule?
    If so, how do I reference it in web.config? I know global.asax is the place
    for such thing but I am just wondering.
    =?Utf-8?B?U2FtdWVs?=, Aug 6, 2005
    #1
    1. Advertising

  2. Hi Samuel,

    APP_CODE code generates into a fixed filename of APP_CODE.DLL so you can use
    that name for the assembly in the Web apps bin directory.

    +++ Rick ---

    --

    Rick Strahl
    West Wind Technologies
    www.west-wind.com
    www.west-wind.com/weblog



    "Samuel" <> wrote in message
    news:...
    > nHi,
    >
    > is it possible to add pure code to APP_Code folder to act as an
    > HTTPModule?
    > If so, how do I reference it in web.config? I know global.asax is the
    > place
    > for such thing but I am just wondering.
    Rick Strahl [MVP], Aug 6, 2005
    #2
    1. Advertising

  3. Thanks Rick for your help. It works well.

    One question: what's the difference now for global.asax and httpmodules
    created in app_code in terms of functionality? I know the way we code the two
    are different, but what's the main difference now for the two methods in .net
    2.0?

    "Rick Strahl [MVP]" wrote:

    > Hi Samuel,
    >
    > APP_CODE code generates into a fixed filename of APP_CODE.DLL so you can use
    > that name for the assembly in the Web apps bin directory.
    >
    > +++ Rick ---
    >
    > --
    >
    > Rick Strahl
    > West Wind Technologies
    > www.west-wind.com
    > www.west-wind.com/weblog
    >
    >
    >
    > "Samuel" <> wrote in message
    > news:...
    > > nHi,
    > >
    > > is it possible to add pure code to APP_Code folder to act as an
    > > HTTPModule?
    > > If so, how do I reference it in web.config? I know global.asax is the
    > > place
    > > for such thing but I am just wondering.

    >
    >
    >
    =?Utf-8?B?U2FtdWVs?=, Aug 6, 2005
    #3
  4. =?Utf-8?B?U2FtdWVs?=

    Brock Allen Guest

    HttpModules and code in global.asax can handle any per-request events fired
    by the HttpApplication (like BeginRequest, EndRequest, etc). Only global.asax
    can handle Application_Start, Application_End, Session_Start and Session_End.
    global.asax is only deployed in the root of your virtual directory whereas
    modules are packaged as assemblies so they can be deployed to ~/bin or in
    the GAC. Modules can be configured machine or site wide as well.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Thanks Rick for your help. It works well.
    >
    > One question: what's the difference now for global.asax and
    > httpmodules created in app_code in terms of functionality? I know the
    > way we code the two are different, but what's the main difference now
    > for the two methods in .net 2.0?
    >
    > "Rick Strahl [MVP]" wrote:
    >
    >> Hi Samuel,
    >>
    >> APP_CODE code generates into a fixed filename of APP_CODE.DLL so you
    >> can use that name for the assembly in the Web apps bin directory.
    >>
    >> +++ Rick ---
    >>
    >> --
    >>
    >> Rick Strahl
    >> West Wind Technologies
    >> www.west-wind.com
    >> www.west-wind.com/weblog
    >> "Samuel" <> wrote in message
    >> news:...
    >>
    >>> nHi,
    >>>
    >>> is it possible to add pure code to APP_Code folder to act as an
    >>> HTTPModule?
    >>> If so, how do I reference it in web.config? I know global.asax is
    >>> the
    >>> place
    >>> for such thing but I am just wondering.
    Brock Allen, Aug 7, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon Sequeira
    Replies:
    3
    Views:
    4,156
    gerry
    Jun 26, 2003
  2. Replies:
    3
    Views:
    7,385
    John R. Lewis
    Jan 4, 2006
  3. =?Utf-8?B?YWJ1bmV0?=
    Replies:
    0
    Views:
    2,301
    =?Utf-8?B?YWJ1bmV0?=
    Jan 23, 2006
  4. dm1608

    ASP.NET 2.0 and App_Code and n-Tier

    dm1608, Feb 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    3,313
    dm1608
    Feb 7, 2006
  5. TonyBushell

    ASP.NET / V2.0 / Master Pages + App_Code

    TonyBushell, Jul 4, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    402
    TonyBushell
    Jul 4, 2007
Loading...

Share This Page