GetCompiledPageInstance and Custom IhttpHandler

M

Mutley

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
 
B

Bruce Barker

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)
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top