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

GetCompiledPageInstance and Custom IhttpHandler

Hi,
I have written an HttpHandler to process page requests for a custom
file extension. The handler gets called as expected and after searching
the web for examples I have used a method called
GetCompiledPageInstance from the PageParser class for getting the web
page within the ProcessRequest method of the custom handler.
I then ran a performance test requesting the custom page mutliple times
(the custom file for the test was an aspx page that I renamed with the
custom file extension) and saw that the custom handler was being
called. I then changed the file extension to be aspx and requested the
page the same number of times as before and saw that the custom handler
was not being called and ASP.NET was processing the aspx page as
normal.
When I compared the performance i.e. requests\sec I noticed that there
was no hit in performance when using the custom handler.
I would have thought there would have been some performance hit and so
I can only think that calling GetCompiledPageInstance is not sufficient
and that to replicate what the ASP.NET handler does when processing a
request involves additonal calls e.g. authentication etc.

Can anyone point me in the direction of or supply me with some
information\sample code on what additional calls if any are required in
the custom handlers ProcessRequest method

Thanks in advance for any help
John

Jan 24 '06 #1
1 1875
GetCompiledPageInstance job is to return an object instance of the passed
page name. it will compile, load assembly and create instance for you, but
performs no page processing. you should call ProcessRequest on the instance
you get back.

-- bruce (sqlwork.com)
"Mutley" <Jo*********@Singularity.co.uk> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi,
I have written an HttpHandler to process page requests for a custom
file extension. The handler gets called as expected and after searching
the web for examples I have used a method called
GetCompiledPageInstance from the PageParser class for getting the web
page within the ProcessRequest method of the custom handler.
I then ran a performance test requesting the custom page mutliple times
(the custom file for the test was an aspx page that I renamed with the
custom file extension) and saw that the custom handler was being
called. I then changed the file extension to be aspx and requested the
page the same number of times as before and saw that the custom handler
was not being called and ASP.NET was processing the aspx page as
normal.
When I compared the performance i.e. requests\sec I noticed that there
was no hit in performance when using the custom handler.
I would have thought there would have been some performance hit and so
I can only think that calling GetCompiledPageInstance is not sufficient
and that to replicate what the ASP.NET handler does when processing a
request involves additonal calls e.g. authentication etc.

Can anyone point me in the direction of or supply me with some
information\sample code on what additional calls if any are required in
the custom handlers ProcessRequest method

Thanks in advance for any help
John

Jan 24 '06 #2

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

Similar topics

3
by: Michael Iantosca | last post by:
I have a custom attribute that I attach to certain pages in my application and I want to inspect each page request as it is made to see if the custom attribute is attached to the underlying page...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
3
by: Martin | last post by:
Hi, I have a number of documents stored on my web server and these documents should not be servered to anybody unless the user is both authenticated and authorized. This authentication and...
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="*"...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
1
by: Daniel | last post by:
How to access a network file path \\foo\bar.txt from an .aspx and from a custom IHttpHandler? How to specify which account that aspx application should use when doing file IO from network paths?...
1
by: Aartware | last post by:
I've read all the items about the IHttpHandler and the session-object and I see nothing wrong with my code, but still I have no session object. This is my code: Imports System Imports...
2
by: IanL | last post by:
I am working with a custom handler factory that serves aspx pages based on url. When this is called, it compiles the page based on the url that the application pool uses to serve up the page. ...
5
by: Author | last post by:
I followed the example at http://support.microsoft.com/kb/308001/EN-US/ and created my own HttpHandler. Here is the code: using System.Web; namespace MyNameSpace { public class...
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: 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: 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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.