Global.asax : BeginRequest Event

Discussion in 'ASP .Net' started by Pietro, Jan 7, 2005.

  1. Pietro

    Pietro Guest

    Hello, I'd like to know if the BeginRequest Event in global.asax can be
    raised when i request a image or another file not an aspx page, if it
    can, how i do it?

    Thanks
    Pietro
     
    Pietro, Jan 7, 2005
    #1
    1. Advertising

  2. Pietro

    Scott Allen Guest

    Pietro:

    Yes, you can do this by forcing the request through the ASP.NET runtime.
    You'll have to edit the script mappings in IIS for the application, see:

    http://support.microsoft.com/kb/815152/EN-US/

    You won't need to take the blocking steps mentioned in the bottom of the
    article, but the article does do a good job explaining the why and how of
    editing the script maps.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    > Hello, I'd like to know if the BeginRequest Event in global.asax can
    > be raised when i request a image or another file not an aspx page, if
    > it can, how i do it?
    >
    > Thanks
    > Pietro
     
    Scott Allen, Jan 7, 2005
    #2
    1. Advertising

  3. Pietro

    vMike Guest

    "Pietro" <> wrote in message
    news:%...
    > Hello, I'd like to know if the BeginRequest Event in global.asax can be
    > raised when i request a image or another file not an aspx page, if it
    > can, how i do it?
    >
    > Thanks
    > Pietro


    One way you can do this is to set your image src property to say
    image.aspx?_img=1234 and use the image.aspx file to get the image and "save"
    the image to the response.outputstream or as a byte stream.

    Mike
     
    vMike, Jan 7, 2005
    #3
    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. Juan Stang

    httpModules :: BeginRequest Behavior

    Juan Stang, May 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    4,087
    Manohar Kamath [MVP]
    May 16, 2004
  2. =?Utf-8?B?YmNoYXJsZXM=?=

    global.asax and global.asax.cs

    =?Utf-8?B?YmNoYXJsZXM=?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    914
    =?Utf-8?B?YmNoYXJsZXM=?=
    Oct 5, 2004
  3. Mark Rae

    Global.asax / Global.asax.cs in v2

    Mark Rae, May 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    3,210
    Mark Rae
    May 23, 2006
  4. Artur
    Replies:
    0
    Views:
    460
    Artur
    Sep 27, 2006
  5. Artur
    Replies:
    0
    Views:
    381
    Artur
    Sep 28, 2006
Loading...

Share This Page