473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Global.asax : BeginRequest Event

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
Nov 19 '05 #1
2 6313
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

Nov 19 '05 #2

"Pietro" <pv******@deltatech.com.br> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: WJ | last post by:
I am attempting to use the Global.Asax to store my user's configuration. Here is the concept: 1. User logs on into the site using Form Authentication. 2. I capture the user Credential, verify it...
2
by: Norton | last post by:
I understand how to create HTTP modules that can be used to add functionality to a website but there are a few things I don't understand. If I create an HTTP Module and I want it to intercept a...
9
by: tshad | last post by:
I have an example I copied from "programming asp.net" (o'reilly) and can't seem to get the Sub (writefile) to execute. It displays all the response.write lines that are called directly, but not...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
2
by: Nathan Sokalski | last post by:
I would like to access variables and functions that I declare in the Global.asax.vb file. However, I am having trouble doing that. What does the declaration have to look like in the Global.asax.vb...
5
by: Piz | last post by:
I've read a previous discussion about the same topic, but there's a difference. I call HttpContext.Current.Response.Redirect("file.txt") from a ownmade sub in the global.asax. That doesn't works,...
8
by: GS | last post by:
What would be the sample code to stop processing any further requests in Application_onStart within global.asax has failed? Response.End does not work since there is no response object at the point...
1
by: Anonieko | last post by:
Global.asax? Use HttpModules Instead! In a previous post, I talked about HttpHandlers - an underused but incredibly useful feature of ASP.NET. Today I want to talk about HttpModules, which are...
4
by: Joe | last post by:
Hello all! I added a Global.asax to my application. I'm using the Application_BeginRequest event. Everything works fine in my development enviorment but when I publish the web site the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.