Hi all,
at the moment i am developing an app which is sort of an interface to
copy data from one database to another and it shall run as a service.
As there are several databases the app must be installed and run in
multiple instances with the configuration data (database, login, etc.)
stored in an app.config file.
Up to now I was concerned with Windows CE apps only so both running an
app as service and running multiple instances of an app is new to me. I
figured out how to create and install a single service app, but now I
don't know how to "multiply" it. I imagine that every app must have its
proper name, so do I have to compile as many instances of my app with
different names as I will need? Or is there a way to "configure" my
single app in a way that I can run it more than once, each being an own
service for windows? And how could I manage the setup then, because
Microsoft's service app sample only shows serveral instances running as
one service, but every instance must be a service of its own.
Any help is appreciated, thanks!
Regards
Roland 4 2023
Roland,
As a suggestion, would it not be better to have a multithreaded application?
There would be one config file (or registry hive etc), containing your
different configurations. When the service starts, it would first load the
config into a queue, then create N threads (where N is the number of
databases you want to read from). Each thread would then take the next
configuration block of the queue, and process to copy that database.
This would mean that you could easily stop and start the threads via a
global "running" flag which you simply set to false. Similarly, starting the
process would kick off all the threads to do your work.
It would be one application, installed at one location, running as one
process with many threads.
If you need more help with ideas for implementing this, let me know.
hope that helps and good luck.
Daniel.
"Roland Riess" <ce******@gmx.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Hi all,
at the moment i am developing an app which is sort of an interface to copy data from one database to another and it shall run as a service. As there are several databases the app must be installed and run in multiple instances with the configuration data (database, login, etc.) stored in an app.config file.
Up to now I was concerned with Windows CE apps only so both running an app as service and running multiple instances of an app is new to me. I figured out how to create and install a single service app, but now I don't know how to "multiply" it. I imagine that every app must have its proper name, so do I have to compile as many instances of my app with different names as I will need? Or is there a way to "configure" my single app in a way that I can run it more than once, each being an own service for windows? And how could I manage the setup then, because Microsoft's service app sample only shows serveral instances running as one service, but every instance must be a service of its own.
Any help is appreciated, thanks!
Regards Roland
Hi Daniel,
I don't know why but your answer reached me only now, more than one day
later (as well as my own post in this newsgroup, by the way).
Thanks for your reply, but the "design" of several independent services
is a customer request, so I have no choice - even if your solution was
rather convincing to me!
Regards
Roland
Dan Bass schrieb: Roland,
As a suggestion, would it not be better to have a multithreaded application?
There would be one config file (or registry hive etc), containing your different configurations. When the service starts, it would first load the config into a queue, then create N threads (where N is the number of databases you want to read from). Each thread would then take the next configuration block of the queue, and process to copy that database.
This would mean that you could easily stop and start the threads via a global "running" flag which you simply set to false. Similarly, starting the process would kick off all the threads to do your work.
It would be one application, installed at one location, running as one process with many threads.
If you need more help with ideas for implementing this, let me know.
hope that helps and good luck.
Daniel.
"Roland Riess" <ce******@gmx.net> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi all,
at the moment i am developing an app which is sort of an interface to copy data from one database to another and it shall run as a service. As there are several databases the app must be installed and run in multiple instances with the configuration data (database, login, etc.) stored in an app.config file.
Up to now I was concerned with Windows CE apps only so both running an app as service and running multiple instances of an app is new to me. I figured out how to create and install a single service app, but now I don't know how to "multiply" it. I imagine that every app must have its proper name, so do I have to compile as many instances of my app with different names as I will need? Or is there a way to "configure" my single app in a way that I can run it more than once, each being an own service for windows? And how could I manage the setup then, because Microsoft's service app sample only shows serveral instances running as one service, but every instance must be a service of its own.
Any help is appreciated, thanks!
Regards Roland
Hmm, it's not really a desirable windows operation. Another tier that
resides with a different company in a project I'm working on tried this and
it proved more a hassle than it was worth.
Still, it can be done with only one service install. You just need to create
N amount of service entries in the registry ( myService1, myService2 etc
etc ) with their own config. Then you need to ensure that the service you're
using isn't accessing any shared global data which could be accessed by
multiple services when you're only expecting one to access it...
I tried these too and there were a few ideas that came up straight away http://groups.google.co.uk/groups?hl...ows+service%22 http://www.google.co.uk/search?q=run...n&start=0&sa=N http://www.dotnet247.com/247referenc...48/242835.aspx
good luck!
"Roland Riess" <ce******@gmx.net> wrote in message
news:O0**************@TK2MSFTNGP09.phx.gbl... Hi Daniel,
I don't know why but your answer reached me only now, more than one day later (as well as my own post in this newsgroup, by the way).
Thanks for your reply, but the "design" of several independent services is a customer request, so I have no choice - even if your solution was rather convincing to me!
Regards Roland
Dan Bass schrieb: Roland,
As a suggestion, would it not be better to have a multithreaded application?
There would be one config file (or registry hive etc), containing your different configurations. When the service starts, it would first load the config into a queue, then create N threads (where N is the number of databases you want to read from). Each thread would then take the next configuration block of the queue, and process to copy that database.
This would mean that you could easily stop and start the threads via a global "running" flag which you simply set to false. Similarly, starting the process would kick off all the threads to do your work.
It would be one application, installed at one location, running as one process with many threads.
If you need more help with ideas for implementing this, let me know.
hope that helps and good luck.
Daniel.
"Roland Riess" <ce******@gmx.net> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi all,
at the moment i am developing an app which is sort of an interface to copy data from one database to another and it shall run as a service. As there are several databases the app must be installed and run in multiple instances with the configuration data (database, login, etc.) stored in an app.config file.
Up to now I was concerned with Windows CE apps only so both running an app as service and running multiple instances of an app is new to me. I figured out how to create and install a single service app, but now I don't know how to "multiply" it. I imagine that every app must have its proper name, so do I have to compile as many instances of my app with different names as I will need? Or is there a way to "configure" my single app in a way that I can run it more than once, each being an own service for windows? And how could I manage the setup then, because Microsoft's service app sample only shows serveral instances running as one service, but every instance must be a service of its own.
Any help is appreciated, thanks!
Regards Roland
Hi Dan,
sorry for the delay but I was busy as I had to finish my "multiple
service" app by today. Finally I opted for a script installation
solution which I found through one of your links. A modified installer
class allows to enter parameters for the setup like service name, user
and password, so that the same code assembly can be used for all
services. The different servers and databases that must be accessed can
be configured by an app.exe.config for each service which may have
identical names as every service is installed in its own directory.
This may not always be a perfect solution but it is just what I need.
Here is the link for everybody that might have the same problem: http://www.codeproject.com/dotnet/Sc...iceInstall.asp
Thanks again for your help!
Regards
Roland
Dan Bass schrieb: Hmm, it's not really a desirable windows operation. Another tier that resides with a different company in a project I'm working on tried this and it proved more a hassle than it was worth.
Still, it can be done with only one service install. You just need to create N amount of service entries in the registry ( myService1, myService2 etc etc ) with their own config. Then you need to ensure that the service you're using isn't accessing any shared global data which could be accessed by multiple services when you're only expecting one to access it...
I tried these too and there were a few ideas that came up straight away
http://groups.google.co.uk/groups?hl...ows+service%22
http://www.google.co.uk/search?q=run...n&start=0&sa=N
http://www.dotnet247.com/247referenc...48/242835.aspx
good luck!
"Roland Riess" <ce******@gmx.net> wrote in message news:O0**************@TK2MSFTNGP09.phx.gbl...
Hi Daniel,
I don't know why but your answer reached me only now, more than one day later (as well as my own post in this newsgroup, by the way).
Thanks for your reply, but the "design" of several independent services is a customer request, so I have no choice - even if your solution was rather convincing to me!
Regards Roland
Dan Bass schrieb:
Roland,
As a suggestion, would it not be better to have a multithreaded application?
There would be one config file (or registry hive etc), containing your different configurations. When the service starts, it would first load the config into a queue, then create N threads (where N is the number of databases you want to read from). Each thread would then take the next configuration block of the queue, and process to copy that database.
This would mean that you could easily stop and start the threads via a global "running" flag which you simply set to false. Similarly, starting the process would kick off all the threads to do your work.
It would be one application, installed at one location, running as one process with many threads.
If you need more help with ideas for implementing this, let me know.
hope that helps and good luck.
Daniel.
"Roland Riess" <ce******@gmx.net> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl. ..
Hi all,
at the moment i am developing an app which is sort of an interface to copy data from one database to another and it shall run as a service. As there are several databases the app must be installed and run in multiple instances with the configuration data (database, login, etc.) stored in an app.config file.
Up to now I was concerned with Windows CE apps only so both running an app as service and running multiple instances of an app is new to me. I figured out how to create and install a single service app, but now I don't know how to "multiply" it. I imagine that every app must have its proper name, so do I have to compile as many instances of my app with different names as I will need? Or is there a way to "configure" my single app in a way that I can run it more than once, each being an own service for windows? And how could I manage the setup then, because Microsoft's service app sample only shows serveral instances running as one service, but every instance must be a service of its own.
Any help is appreciated, thanks!
Regards Roland
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ken Lindner |
last post by:
I have a need to become familiar with SQL Server 2000 for work.
Needless to say I am new to SQL Server any version, but not IT in
general. My employer has provided me with the SQL Server 2000...
|
by: Vlad |
last post by:
Is there any way to install multiple instances of the same windows service
designed with VS.NET 2003? I tried copying the binaries into a separate
folder and then copying registry entries for the...
|
by: Mike |
last post by:
Looking to find any information on how to properly configure multiple
instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking
for information on how the multiple instance settings...
|
by: alexs |
last post by:
Chaps,
I'm having a small problem installing db2 on a Red Hat Enterprise
server (version 4)
Basically I installed DB2 V8.1 , applied fixpak 5 and then the 2.6
kernel specific fixpak 9 update. I...
|
by: J |
last post by:
hi,
I'm having a problem installing a service created in vb.net 2003 on a
windows 2000 server. I have installed the service on a few XP machines with
out any problems...but the 2 servers (win...
|
by: Andrea Vincenzi |
last post by:
Help me please, I'm totally stuck!
My Visual Studio 2003 debugger stopped working after I installed
Windows XP Service Pack 2. Here is what happens (with any project,
even a "Hello, world"...
|
by: John |
last post by:
I currently have a Windows Service that runs Transactions that are very
Processor/Memory Intensive. I have a requirement to deploy multiple
instances of the Web service on the Same server. Each...
|
by: vijaykumars |
last post by:
+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+
Installation...
|
by: =?Utf-8?B?RWxpb3Ro?= |
last post by:
I try to install Windows Services but it show this error during the
installation process, "Insufficient System resources exist to complete the
requested service."
I created this Services in VB...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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,...
|
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...
|
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...
|
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...
| |