I'm writing an app that processes orders for various customers. For
most customers, the processing is the same. However, a few customers
require custom processing in addition to the standard processing that
is performed on all orders.
To accomplish this, I have created an interface and for the sake of
this question, it's only method is called SpecialProcess. For each
customer that requires special processing, I create a separate assembly
with a class that implements this interface. Then, during the
execution of the app, I check an .xml file to see if the particular
customer requires special processing and if so, I load the assembly for
that customer using reflection and execute the SpecialProcess method.
The application is implemented as a Windows service so it constantly
runs. My question concerns updating an assembly that may already be
loaded. I do not want to stop and restart the service if the custom
processing assembly requires changes. If an assembly is loaded again
but it is a different version, what would happen to the original loaded
assembly?
For example, say the application loads "Custom.dll , v 1.0" during it's
execution loop. Then say, that before the next time it needs to call
the custom.dll, it has been changed to version 1.1. When the code
that loads the assembly is executed, will both versions be in memory?
Or will the new version replace the older version? Will the .Net
runtime handle this for me properly?
I hope my question is clear. I know that I can use another AppDomain
to load the assembly and then unload the AppDomain to unload the
assembly, but is that the best way?
I merely need to be able to update an assembly without having to
restart the app that uses it.
Thanks,
Chris 2 1500
You might want to take a look at this article, if you haven't already. It
may be of help. http://www.15seconds.com/issue/040624.htm
"Chris Dunaway" wrote: I'm writing an app that processes orders for various customers. For most customers, the processing is the same. However, a few customers require custom processing in addition to the standard processing that is performed on all orders.
To accomplish this, I have created an interface and for the sake of this question, it's only method is called SpecialProcess. For each customer that requires special processing, I create a separate assembly with a class that implements this interface. Then, during the execution of the app, I check an .xml file to see if the particular customer requires special processing and if so, I load the assembly for that customer using reflection and execute the SpecialProcess method.
The application is implemented as a Windows service so it constantly runs. My question concerns updating an assembly that may already be loaded. I do not want to stop and restart the service if the custom processing assembly requires changes. If an assembly is loaded again but it is a different version, what would happen to the original loaded assembly?
For example, say the application loads "Custom.dll , v 1.0" during it's execution loop. Then say, that before the next time it needs to call the custom.dll, it has been changed to version 1.1. When the code that loads the assembly is executed, will both versions be in memory? Or will the new version replace the older version? Will the .Net runtime handle this for me properly?
I hope my question is clear. I know that I can use another AppDomain to load the assembly and then unload the AppDomain to unload the assembly, but is that the best way?
I merely need to be able to update an assembly without having to restart the app that uses it.
Thanks,
Chris
Thanks for the link. It is very interesting, but not what I was
looking for. Basically my Windows service starts and then does some
processing each time a timer interval fires. In this processing is
code like this (pseudocode):
'This sub executed periodically in a timer event.
Public Sub Process()
GetCustomerData
PerformStandard Processing
If SpecialProcessi ngNeededForThis Customer Then
LoadCustomAssem blyForThisCusto mer
ExecuteCodeInCu stomAssembly
End If
End Sub
If, between the first and the next execution of the custom assembly
code, the assembly is replaced with an updated version, will it load
the new assembly and still keep the old loaded in memory? Or will the
new assembly replace the old one in memory?
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Erik Bethke |
last post by:
Hello All,
I am trying to clean up some polish bugs with the Shanghai game I am
working on and I am currently stuck on trying to get the right event
for detecting when the user has changed the desktop resolution.
I have tried trapping the following events:
1) SDL_ACTIVEEVENT
2) SDL_VIDEOEXPOSE
|
by: Erik Bethke |
last post by:
Hello All,
I am trying to clean up some polish bugs with the Shanghai game I am
working on and I am currently stuck on trying to get the right event
for detecting when the user has changed the desktop resolution.
I have tried trapping the following events:
1) SDL_ACTIVEEVENT
2) SDL_VIDEOEXPOSE 3) SDL_VIDEORESIZE
|
by: Simon Wallis |
last post by:
I know the general purpose for the GAC is to share a component among many applications. But even when you add something to the GAC, you still have to manually create a reference to the DLL in your project (right?). So what have I gained by adding it to the GAC?
|
by: wij |
last post by:
Hi:
Is there better way of detecting multiplication overflow for type
long than by using double precision of lldiv to verify the result?
Thanks in advance.
I.J.Wang
|
by: Simon Harvey |
last post by:
Hi all,
Is there any easy way to check a field for calues that have changed on a
post back.
So the page is sent to the user, the user changes some values and I need to
know which ones changed.
Is the only way to do this to go through all the fields and check them
against their old values. In which case, would I need to store the values in
| |
by: needin4mation |
last post by:
Hi, I have an asp.net 1.1 application that populates data from a
database. When the user changes data, they have to hit a button to
update the data. The data entry form (same form that is populated) is
from several different tables. To the user, of course, this is not
seen.
Scenario: After the page is populated, assume a change is made to the
form and the user hits update. The page then goes back, reads the
database for that record...
|
by: Chris Dunaway |
last post by:
I'm writing an app that processes orders for various customers. For
most customers, the processing is the same. However, a few customers
require custom processing in addition to the standard processing that
is performed on all orders.
To accomplish this, I have created an interface and for the sake of
this question, it's only method is called SpecialProcess. For each
customer that requires special processing, I create a separate...
|
by: fermineutron |
last post by:
Some compilers support __asm{ } statement which allows integration of C
and raw assembly code. A while back I asked a question about such
syntax and was told that __asm is not a part of a C standard. My
question now is:
Is there a chance that such statement will become a part of C standard
in the future? In some cases using asm language is the best way to
acomplish some small task, hence integration of C and asm would greatly
enhence C,...
|
by: Igor |
last post by:
Hi!
We built VB6 application to work with Reporting Services server. To connect
to reporting server has been created a special assembly with .NET VS2003.
While we execute our program on local machine, every thing works. But when we
put the whole program on network drive, the VB6 program could not create
required object from .NET assembly.
Nothing we done were not useful to help to solve the problem.
Does anybody have idea?
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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();...
|
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
| |
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...
| |