473,765 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Feb 2 '06 #1
2 2255
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" <Di*******@disc ussions.microso ft.com> wrote in message
news:11******** *************** ***********@mic rosoft.com...
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

Feb 2 '06 #2

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" <Di*******@disc ussions.microso ft.com> wrote in message
news:11******** *************** ***********@mic rosoft.com...
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


Feb 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2245
by: Nick Jacobson | last post by:
This question is with regard to the * operator as used for sequence concatenation. There's the well-known gotcha: a = ] b = a*3 b = 4 print b
0
1374
by: Tom Clement | last post by:
Hi folks. I have a question about "Copy Local". We have quite a few projects in our solution (35) and some of them reference the very large "Microsoft.mshtml.dll". I was wondering why leave "Copy Local" set to true in these projects for that reference and other non-project non-framework DLLs. It seems to me that if they all reference it from the same location, then the only project that needs to have "Copy Local" set to true is the...
27
2300
by: Shagy | last post by:
Greetings, I've been trying to find an equivant c funtion to the c++ copy function. Description: copy(char *cstring, size_t count, size_t offset); Copies "count" characters from a C-style string starting at offset.
2
1543
by: Kevin Frey | last post by:
Is it possible to get c# perform a using statement where the namespace for the using is not specified literally but instead comes from a variable, a token, a predefined value etc. We have numerous auto-generated assemblies that represent specific database models within a database, but each assembly uses commonly-named base classes with common implementations. I am writing code that deals only with the base classes, hence it *could* be...
0
1291
by: Diffident | last post by:
Hello All, I am trying to do a "build" of all files of my web app on my local machine. I know that there is an "aspnet_wp.exe" running forever on my machine and to my knowledge each web app is hosted in its own AppDomain. Now when I do a build on my local machine is this AppDomain unloaded? If yes, why does it have to be unloaded? Cannot it drain stop the current AppDomain and spawn a new AppDomain with the new assembly. Please refer to...
2
1709
by: Nils Magnus Englund | last post by:
Hello, In the root of a web site (C:\Inetpub\wwwroot), I have a .NET 1.1 application. I've just added a .NET 2.0 application to another directory under the web site root (C:\Inetpub\wwwroot\20App). After restarting the IIS server, the 1.1 application works fine - however, when I first request a page from the 2.0 application (which also works fine, by the way), the 1.1 application stops working. Every time I request a page from the 1.1...
3
5068
by: GMiller | last post by:
I have deployed a .NET 2 application on a customer's system. I'm trying to use the .NET 1.1 configuration tool to load the assembly but I always get an 'unable to load assembly" message. What is causing this? Thank you, Gary
4
2979
by: Waldy | last post by:
Hi there, does anyone know the cause of this problem. When I press F5 to debug a C# web application, I get an error message that begins "Cannot create/shadow copy " then various different file names. Sometimes I can debug, other times I get the message above. Regards, Steve W.
1
2087
by: mrpetegroups | last post by:
Hi - Problem: The file below has become zero length \winnt\assembly\GAC_MSIL\system.deployment\2.0.0.0_b03f5f7f11d50a3a \system.deployment.dll Details follow ... I've been programming computers for a long, long time, but VB/.NET/ etc. is not my specialty.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10161
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9955
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9833
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.