Shadow copying

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex

    #1

    Shadow copying

    Is this correct:

    1. When the first request for an application on the virtual directory comes
    in and ASP.NET worker process creates an AppDomain for that particular
    application, it copies the code-behind(if there is one) to the
    v1.1.4322\Tempo rary ASP.NET Files\(appname) \....

    2. For the lifetime of this application the code-behind in the shadow folder
    is locked.

    3. If I do xcopy update on the code-behind in the \bin folder, when the next
    request comes in, the AppDomain will compare the dates of the \bin
    code-behind and shadow-folder code-behind, and if \bin is newer, it will
    unload the reference to shadow code-behind, copy the new code-behind DLL to
    shadow foldre, reference it, and proceed with parse, generate class, etc....


  • alien2_51

    #2
    Re: Shadow copying

    I'm not sure it would do a comparison of dates between files, that would
    seem to slow... Although there is a piece of the framework that would do
    this nicely and I would be willing to bet this is how aspnet monitors
    changes in appDomains....F ileSystemWatche r very cool indeed..... I think
    this is also how the framework detects changes in the .config files....


    "Alex" <a.agranov@veri zon.net> wrote in message
    news:#WXBCgdXDH A.1940@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Is this correct:
    >
    > 1. When the first request for an application on the virtual directory[/color]
    comes[color=blue]
    > in and ASP.NET worker process creates an AppDomain for that particular
    > application, it copies the code-behind(if there is one) to the
    > v1.1.4322\Tempo rary ASP.NET Files\(appname) \....
    >
    > 2. For the lifetime of this application the code-behind in the shadow[/color]
    folder[color=blue]
    > is locked.
    >
    > 3. If I do xcopy update on the code-behind in the \bin folder, when the[/color]
    next[color=blue]
    > request comes in, the AppDomain will compare the dates of the \bin
    > code-behind and shadow-folder code-behind, and if \bin is newer, it will
    > unload the reference to shadow code-behind, copy the new code-behind DLL[/color]
    to[color=blue]
    > shadow foldre, reference it, and proceed with parse, generate class,[/color]
    etc....[color=blue]
    >
    >[/color]


    Comment

    • Alex

      #3
      Re: Shadow copying

      On [GMT+0100=CET],
      alien2_51 <dan.billow@n.o .s.p.a.m.monaco coach.com> thought hard and spewed:
      [color=blue]
      > I'm not sure it would do a comparison of dates between files, that
      > would seem to slow... Although there is a piece of the framework that
      > would do this nicely and I would be willing to bet this is how aspnet
      > monitors changes in appDomains....F ileSystemWatche r very cool
      > indeed..... I think this is also how the framework detects changes in
      > the .config files....
      >[/color]

      You are correct, FileSystemWatch er would be most efficient implementation
      rather then checking every time timestamps between 2 different files on
      every request. This way any shadow-copying check only happens when the xcopy
      is performed.


      Comment

      Working...