Question on article by Scott about "Shadow copy of an assembly"

Discussion in 'ASP .Net' started by =?Utf-8?B?RGlmZmlkZW50?=, Feb 2, 2006.

  1. Hello All,

    I just finished reading an interesting article by Scott about App Domains:
    http://odetocode.com/Articles/305.aspx

    Scott, I have a question about the section "Shadow Copies and Restarts". You
    talked about "Drain Stopped" and "Shadow Copy" concepts in this article. I
    maintain a web application which is in production. Every morning the way we
    build the project is using Visual Studio's IDE to use "Build ->
    Build<proj-name>" which basically builds all the files and copies the DLL
    into the bin directory. Now during this build process, users are still using
    our web application and sometimes they notice a weird error because of the
    build process.

    Now according to your article, if we simply copy the DLL into the bin
    directory without building the project while users are using the machine can
    we still take advantage of "Drained Stopped" behavior of AppDomains?

    Why are my users noticing the weird errors if you think that App Domains use
    the "Drain Stopped" phenomenon?

    What are the differences between using IDE's build to build the web app
    while users are using the web app VS Shadow copy?

    Thanks a bunch
    =?Utf-8?B?RGlmZmlkZW50?=, Feb 2, 2006
    #1
    1. Advertising

  2. Building a site using the IDE is not the same as "shadow copy". You still
    need to provide the updated DLL to the website. For instance, suppose that
    some bug was fixed, you still need to compile the assemblies in the IDE.
    Then you would copy the DLL to the bin folder of your production website.

    "Shadow copy" simply means that IIS will copy the assembly into a temp
    location. Therefore the actual assembly running is not the one in the bin
    folder but someone else, thereby preventing locks from happening.

    I am not sure what "weird" issues your customers are having, but there are
    some consequences the way I understand it to reloading the AppDomain. It is
    my understanding that the sessions and other cross-post persistent
    information is cleared when an AppDomain recycles. The AppDomain can
    recycle in other situations as well like when the server determines that too
    much memory is being used and other issues. It might recycle the AppDomain
    to clear things like memory leaks.


    "Diffident" <> wrote in message
    news:...
    > Hello All,
    >
    > I just finished reading an interesting article by Scott about App Domains:
    > http://odetocode.com/Articles/305.aspx
    >
    > Scott, I have a question about the section "Shadow Copies and Restarts".
    > You
    > talked about "Drain Stopped" and "Shadow Copy" concepts in this article. I
    > maintain a web application which is in production. Every morning the way
    > we
    > build the project is using Visual Studio's IDE to use "Build ->
    > Build<proj-name>" which basically builds all the files and copies the DLL
    > into the bin directory. Now during this build process, users are still
    > using
    > our web application and sometimes they notice a weird error because of the
    > build process.
    >
    > Now according to your article, if we simply copy the DLL into the bin
    > directory without building the project while users are using the machine
    > can
    > we still take advantage of "Drained Stopped" behavior of AppDomains?
    >
    > Why are my users noticing the weird errors if you think that App Domains
    > use
    > the "Drain Stopped" phenomenon?
    >
    > What are the differences between using IDE's build to build the web app
    > while users are using the web app VS Shadow copy?
    >
    > Thanks a bunch
    Peter Rilling, Feb 2, 2006
    #2
    1. Advertising

  3. Re: Question on article by Scott about "Shadow copy of an assembly

    Peter,

    Thanks for your reply but I have a question. Earlier in my post when I said
    "build" I was referring to the fact that I usually open the production web
    app's csproj file using the "File > Open From Web" option and then build the
    project while users are using it. Bin directory in my case would be the App
    Base's bin directory as I am building the project on server.

    So in my case does "Build" cause the AppDomain to reload?

    Why would it reload the AppDomain if IIS shadow copied my old assembly?

    Thanks for your clarification.

    "Peter Rilling" wrote:

    > Building a site using the IDE is not the same as "shadow copy". You still
    > need to provide the updated DLL to the website. For instance, suppose that
    > some bug was fixed, you still need to compile the assemblies in the IDE.
    > Then you would copy the DLL to the bin folder of your production website.
    >
    > "Shadow copy" simply means that IIS will copy the assembly into a temp
    > location. Therefore the actual assembly running is not the one in the bin
    > folder but someone else, thereby preventing locks from happening.
    >
    > I am not sure what "weird" issues your customers are having, but there are
    > some consequences the way I understand it to reloading the AppDomain. It is
    > my understanding that the sessions and other cross-post persistent
    > information is cleared when an AppDomain recycles. The AppDomain can
    > recycle in other situations as well like when the server determines that too
    > much memory is being used and other issues. It might recycle the AppDomain
    > to clear things like memory leaks.
    >
    >
    > "Diffident" <> wrote in message
    > news:...
    > > Hello All,
    > >
    > > I just finished reading an interesting article by Scott about App Domains:
    > > http://odetocode.com/Articles/305.aspx
    > >
    > > Scott, I have a question about the section "Shadow Copies and Restarts".
    > > You
    > > talked about "Drain Stopped" and "Shadow Copy" concepts in this article. I
    > > maintain a web application which is in production. Every morning the way
    > > we
    > > build the project is using Visual Studio's IDE to use "Build ->
    > > Build<proj-name>" which basically builds all the files and copies the DLL
    > > into the bin directory. Now during this build process, users are still
    > > using
    > > our web application and sometimes they notice a weird error because of the
    > > build process.
    > >
    > > Now according to your article, if we simply copy the DLL into the bin
    > > directory without building the project while users are using the machine
    > > can
    > > we still take advantage of "Drained Stopped" behavior of AppDomains?
    > >
    > > Why are my users noticing the weird errors if you think that App Domains
    > > use
    > > the "Drain Stopped" phenomenon?
    > >
    > > What are the differences between using IDE's build to build the web app
    > > while users are using the web app VS Shadow copy?
    > >
    > > Thanks a bunch

    >
    >
    >
    =?Utf-8?B?RGlmZmlkZW50?=, Feb 2, 2006
    #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. SK
    Replies:
    1
    Views:
    307
    llewelly
    Sep 16, 2003
  2. Roshan
    Replies:
    5
    Views:
    546
  3. Scott Mcmahan vs Laurence Kirby

    , Jan 12, 2007, in forum: C Programming
    Replies:
    11
    Views:
    425
    Christopher Benson-Manica
    Jan 13, 2007
  4. Peter
    Replies:
    15
    Views:
    848
    Diego Martins
    Feb 27, 2007
  5. Katharine Meyers

    >>>>> Mr Scott Jenkings

    Katharine Meyers, Feb 24, 2007, in forum: C++
    Replies:
    0
    Views:
    519
    Katharine Meyers
    Feb 24, 2007
Loading...

Share This Page