Shadow copying

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....
 
A

alien2_51

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....
 
A

Alex

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.
 

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