Shadow copying

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

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\Temporary 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....
 
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....FileSystemWatcher very cool indeed..... I think
this is also how the framework detects changes in the .config files....
 
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....FileSystemWatcher very cool
indeed..... I think this is also how the framework detects changes in
the .config files....

You are correct, FileSystemWatcher 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.
 
Back
Top