PageParser.GetCompiledPageInstance

  • Thread starter Thread starter IanL
  • Start date Start date
I

IanL

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. Is there a way to "re-
compile" or change the underlying .aspx page displayed when calling
this method for a specified url?

So is the only way to change the layout to restart the webapp or touch
the web.config which are not viable options.

This is a pretty tricky problem, and there may not be a solution, but
any insight into the process would be cool.

My current understanding is this

1st Request
Request (To Url X) --> Handler Factory --> GetCompiledPageInstance --
... --> page is compiled --> page events --> page to client

2nd Request (To Url X) --> Handler Factory --> GetCompiledPageInstance
--> ... --> page events
 
not sure what you are trying to do.

GetCompiledPageInstance uses the physical path to the aspx file to determine
if the page needs to be compiled and loaded into memory, or if its already
loaded. it has a file dependency, so that a file change will trigger a
recompile. once a page is loaded in memory it can be unloaded without a
appdomain recycle. if you change the page code, then the recompile is
triggered.

it sounds like you may be wanting to do url remapping which has nothing to
do with GetCompiledPageInstance.

-- bruce (sqlwork.com)
 
The implementation I am working on is kind of a hack, but it's the way
it is. It is being used for rewriting, but the user has the ability to
switch which .aspx pages are used for a url. I have solution to
rewrite this but... I was wondering if there is a band-aid besides,
recycling, and possibly touching the .aspx file?
 
Back
Top