PageParser.GetCompiledPageInstance

Discussion in 'ASP .Net' started by IanL, May 13, 2008.

  1. IanL

    IanL Guest

    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
    IanL, May 13, 2008
    #1
    1. Advertising

  2. IanL

    bruce barker Guest

    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)


    "IanL" wrote:

    >
    > 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
    >
    bruce barker, May 13, 2008
    #2
    1. Advertising

  3. IanL

    IanL Guest

    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?
    IanL, May 16, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ralfs
    Replies:
    0
    Views:
    372
    Ralfs
    Jul 8, 2003
  2. Misha Bergal

    Making a custom PageParser

    Misha Bergal, May 21, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    500
    Steven Cheng[MSFT]
    May 23, 2005
  3. Martin
    Replies:
    4
    Views:
    3,964
    joekey
    Apr 23, 2009
  4. Mutley
    Replies:
    1
    Views:
    2,051
    Bruce Barker
    Jan 24, 2006
  5. Tom Jerry

    PageParser and SecurityPermission.UnmanagedCode

    Tom Jerry, Oct 13, 2004, in forum: ASP .Net Security
    Replies:
    1
    Views:
    110
    Karenin
    Jan 10, 2005
Loading...

Share This Page