Global.asax : BeginRequest Event

P

Pietro

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
 
S

Scott Allen

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.
 
V

vMike

Pietro said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top