473,434 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Plugging code to a service

Hi

I am writing a vb.net windows service which is expected to have its
processing code changed more often than usual. As uninstalling and
reinstalling a service is bit awkward, is there a way for the service to
call code that residues outside the service that can be changed easily
without having to uninstall and reinstall service whenever the processing
requirements change? If so how?

Thanks

Regards
Feb 28 '08 #1
3 949
John wrote:
I am writing a vb.net windows service which is expected to have its
processing code changed more often than usual. As uninstalling and
reinstalling a service is bit awkward,
Yes, but why bother?

So long as you [can] /stop/ the service first, you scan simply overwrite
the executable and then restart it.
is there a way for the service to
call code that residues outside the service that can be changed easily
without having to uninstall and reinstall service whenever the processing
requirements change? If so how?
You're thinking along the lines of "plug-ins" here.
Yes, it's perfectly possible but your problem will be overwriting the
"plug-in" dll's after the service has [loaded and] used it.
You'll have to play with creating AppDomains within the service /into
which/ you load and run each "plug-in" then, when you tear down the
AppDomain, then (in theory) the dll should be freed up for you to
overwrite it.

HTH,
Phill W.
Feb 28 '08 #2
"John" <Jo**@nospam.infovis.co.ukwrote in
news:#M**************@TK2MSFTNGP03.phx.gbl:
processing code changed more often than usual. As uninstalling and
reinstalling a service is bit awkward, is there a way for the service
to call code that residues outside the service that can be changed
easily without having to uninstall and reinstall service whenever the
processing requirements change? If so how?
Yes you can create a plugin framework.

You can use reflection to do this.

--
sp**********@rogers.com (Do not e-mail)
Feb 28 '08 #3
John wrote:
Hi

I am writing a vb.net windows service which is expected to have its
processing code changed more often than usual. As uninstalling and
reinstalling a service is bit awkward, is there a way for the service
to call code that residues outside the service that can be changed
easily without having to uninstall and reinstall service whenever the
processing requirements change? If so how?
As Phil said, once you have installed the service, you just stop it using the
Services panel, replace the exe, and start it again. Its very quick.
Feb 28 '08 #4

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

Similar topics

1
by: kurt | last post by:
greetings, I'm working on a bookmarklet that needs to overwrite the current document with a frameset where the src of one of the frames is the current URL. What I've come up with works in Mozilla...
1
by: Rob Meade | last post by:
Hi all, I found an article on how to write a Windows service here: http://www.dotnetbips.com/displayarticle.aspx?id=178 It was pretty much what I wanted, I want the service to scan a...
2
by: Nathan | last post by:
I have created a windows service but am having difficulties handling exceptions in the OnStart. What I want to do is if an exeception occurs during any of the code executed during the OnStart is...
3
by: Marc R. | last post by:
Hi all, The beginner strikes back again (sorry) this is the class I use for Nodes into a treeview, I need to bind each field to a database..... How Can I do that ? What I tried so far is to...
2
by: shyam | last post by:
I have a C++ COM based windows service which have more than 30k lines of code and which is stablized over years. We need to take the advantage of the ..NET framework for this project, especially...
11
by: Chad | last post by:
Hi Is it possible to substitute an alternative data source (eg MySQL or SQL Server) into an existing MS-Access application?
21
by: S.Mohideen | last post by:
Hi All, I was thinking about the feasbility of adjusting Python as a compiled language. Being said that I feel these are the following advantages of doing so -- 1) Using the powerful easy-to -use...
7
by: louis08 | last post by:
When i call: OdetteFTPEntity oftp = session.acceptConnection(transport); I recive a java.nio.BufferOverflowException
1
by: emekadavid | last post by:
this is my code logic: I have a JSR 199 (JavaCompiler) that plugs in a processor (processor extends AbstractProcessor), the processor supports the annotation I want to reflect upon, @Worker and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
agi2029
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,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.