473,386 Members | 1,958 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.

HttpHandler issue

Hi Guys
I have a problem with my httphandler here. I have several httphandler in my
application. each of them do the different job. but I found sometimes it
really slow down the performance. Is there a way I can specify that one
handler can only be used on certain pages? like httphandler A is used on
page A,B and httphandler B is only used on Page C, D?

Cheers
Victor
May 23 '07 #1
4 1567
Hi Victor,

From your description, what you wonder is how to make each registered
httphandler only serve a certain set of requests/pages, correct?

Based on my understanding, you can consider the following two approaches
here:

1. Since custom httphandler or httpmodule setting can be configured in sub
directory level, you can consider group those pages or requests in to
different child directory of your ASP.NET application and configure the
specific httphandlers in those sub directory's web.config file. Thus,
requests to one sub directory won't be able to use handlers registered in
another sub directory.

#<httpHandlersElement
http://msdn2.microsoft.com/en-us/lib...67(VS.71).aspx
2. Another formal way is use a HttpHandlerFactory, you can register this
factory as handler in your web.config for all the requests. Then, in the
handlerFactory's code, you can check the coming requests(url or other
conditions) and determine which handler to return and process the request.

#How to: Create HTTP Handler Factories
http://msdn2.microsoft.com/en-us/library/ms227439.aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 23 '07 #2
Hi Victor,

Have you got any further idea on this issue or does the suggestion in my
last reply help you some?
If there is anything else we can help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

May 25 '07 #3
Hi steven..Thanks for help..
but I have found i made a stupid mistake. I am using a httpmodule instead of
a httphandler.
What i want to achieve is i have a httpmodule to handle my uploade file
function. But I want this module will only be used when there has something
want to be uploaded to the server. Currently, all pages need to go through
the beginrequest method for the upload httpmodule.
is there anyway I can avoid this?

Thanks
Victor

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:wq****************@TK2MSFTNGHUB02.phx.gbl...
Hi Victor,

Have you got any further idea on this issue or does the suggestion in my
last reply help you some?
If there is anything else we can help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jun 1 '07 #4
Thanks for your followup Victor,

So you're actually using the httpmodule. If so, I think this is the
expected behavior. According to ASP.NET server-side processing pipeline
model, each ASP.NET requests will come through those httpmodules registered
in the application(there is no filter to exclude specific requests). If you
do need to use httpmodule and ignore some particular requests(depend on the
url's extension), you should manually check the request url in httpmodule's
code).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 1 '07 #5

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

Similar topics

0
by: Bruce B | last post by:
Hi group, I'm experiencing some extreme weirdness over the last week with IIS related to it's Mappings and how .NET is behaving. I can't explain the behavior as it seems very random. Our...
9
by: Jared Tullis | last post by:
We have an .NET 1.1 application running on 4 2K3 load balanced servers (using WLBS). IIS has the .NET aspnet_isapi.dll mapped as a wildcard application map. The web.config points *.html to a...
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
3
by: Michael Schwarz | last post by:
Hi, I have a own HttpHandler running and configured like this in my web.config: <add verb="*" path="subfolder/*.ashx" type="Class,Assembly"/> Now, when turning cookieless Sessions on my...
0
by: Gais | last post by:
Hi, I have written an httphandler to deal with all requests for .aspx files on a website to rewrite URLs in to a more search engine friendly format. I uploaded to changes to the site and it all...
0
by: Burt | last post by:
I have an ASP.NET page that performs a window.open to an HttpHandler that streams a binary file to the brower. I am forcing the save_as... dialog in IE. My issue is that in IE6 the new window...
2
by: Alan Samet | last post by:
I have a performance issue related to HttpHandlers. I've written a photo gallery application that uses HttpHandlers to manage a virtual URL to my thumbnails. When I render the document with the...
2
by: wickedHangover | last post by:
I'm writing some code to act as a proof of concept which at this point works ok, there is a minor issue I would like to resolve. What I have is an image database being served in an academic...
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
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?
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
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
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.