473,386 Members | 1,652 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,386 software developers and data experts.

asp.net 2.0 handler useage

>From what i understand asp.net handler is the replacement for isapi
filters. is it possible to write a handler that redirects all .zip
download requests to a html page. the .zip file might not exist? btw i
use c#
http://www.mysite.com/dfjksjfksdfaj.zip
http://www.mysite.com/dfjksj/fksdfaj.zip
http://www.mysite.com/aj.zip
will all redirect to
http://www.mysite.com/download.htm

Dec 21 '05 #1
1 957
Yes, it is. HTTP handler can be mapped to a file extension (such as .zip),
so that file with a name plus that extension (anyfilename.zip) does not
physically exist. E.g request is then processed by the handler.

You just need to do the mapping in IIS and in ASP.NET's web.config file so
that IIS and ASP.NET know that extension is going to be served by ASP.NET
and a custom HTTP handler (in ASP.NET)

For the reference:;

Introduction to HTTP Handlers
http://msdn2.microsoft.com/en-us/library/ms227675.aspx

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Aaron" <ku*****@yahoo.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
From what i understand asp.net handler is the replacement for isapi

filters. is it possible to write a handler that redirects all .zip
download requests to a html page. the .zip file might not exist? btw i
use c#
http://www.mysite.com/dfjksjfksdfaj.zip
http://www.mysite.com/dfjksj/fksdfaj.zip
http://www.mysite.com/aj.zip
will all redirect to
http://www.mysite.com/download.htm

Dec 21 '05 #2

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

Similar topics

0
by: Leon | last post by:
I noticed that any running .NET window application including .Net Visual Studio, when GUI is not minimized and keped running for long time, the memory useage of its could be high, but, when it is...
13
by: aundro | last post by:
Hello, I've been looking on the web for a solution to this problem: I create a set of checkboxes, and 2 buttons: - one is labeled "All" - the other is labeled "None" Clicking "All" is...
9
by: J Bunton | last post by:
My Access 97 applictions seem to have recently become very Cpu useage hungry. When opened they go to almost 100% useage on the peformance monitor. After several seconds this returns to near...
3
by: LeTubs | last post by:
Hi I'm not sure if this is correct ...place to post but here goes This is what i'm trying to do, I want to write a signal / alarm handler ( I don't know which hence the posting here, as once I...
7
by: Vasil Buraliev | last post by:
Hallo. I started a solution in VS.NET with template for C# windwos application. The solution has several projects: -Artifacts -BusinessRules -Client -ErrorLog -Standardization .... ... ..
10
by: Wylbur via DotNetMonster.com | last post by:
Hello to all of you geniuses, I'm having a problem trying to get an Init handler to fire for a Placeholder control at the initialization phase. I’ve posted this problem to 3 other ASP.NET...
10
by: Sean Dockery | last post by:
I have the following HTML file that I've been using for testing... <html> <head> <script type="text/javascript"> <!-- function handleWindowLoad() { var items = ; for (var i = 0; i < 11; i++)...
6
by: =?Utf-8?B?cHJhZGVlcF9UUA==?= | last post by:
I am trying to create a simple HTTP handler in ASP.net 2.0. I am using VS 2005. I am trying to handle a custom extension file givein in the URL. I have also created the following entry in the...
16
by: Peter Oliphant | last post by:
Note that although this involves SAPI, it is more a question about Timers and event handlers. I wrote a Speech Recognize handler (SAPI), and put some code in it to enable a Timer. It would not...
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: 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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.