473,546 Members | 2,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to implement "More than one user Service may run within the same process"

Hello,
I've written a Windows service and i need help to implement the meaning
of the sentence which is generated automatically by the IDE

// More than one user Service may run within the same process. To add
// another service to this process, change the following line to
// create a second service object. For example,
//
// ServicesToRun = new System.ServiceP rocess.ServiceB ase[] {new
Service1(), new MySecondUserSer vice()};
//

My target is basically to implement survivability of my project so if
the service will "fall down" another process / user will be able to
continue.

Does someone have any idea ??

10x.

Aug 22 '06 #1
4 2713
if your first service blows up due to an unhandled exception, its going to
take your second "service" with it, because the process is going to go away.
Suggest looking into a more robust alternative for whatever it is you want to
accomplish.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"ha*****@gmail. com" wrote:
Hello,
I've written a Windows service and i need help to implement the meaning
of the sentence which is generated automatically by the IDE

// More than one user Service may run within the same process. To add
// another service to this process, change the following line to
// create a second service object. For example,
//
// ServicesToRun = new System.ServiceP rocess.ServiceB ase[] {new
Service1(), new MySecondUserSer vice()};
//

My target is basically to implement survivability of my project so if
the service will "fall down" another process / user will be able to
continue.

Does someone have any idea ??

10x.

Aug 22 '06 #2
Hello, ha*****@gmail.c om!


[skipped]

hMy target is basically to implement survivability of my project so if
hthe service will "fall down" another process / user will be able to
hcontinue.

hDoes someone have any idea ??

You can start several windows services with different names, if one fails another starts operaing
instaed of "dead" one.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Aug 22 '06 #3
"Vadym Stetsyak" <va*****@ukr.ne twrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
You can start several windows services with different names, if one fails
another starts operaing
instaed of "dead" one.
You can also set the Recovery option for a service to have Windows restart
it automatically if it dies.

-- Alan
Aug 22 '06 #4
Please don't push people to start 'shadow' service processes, keep in mind
that services use precious resources not consumed by regular processes.
Better is to look at the option presented by Alan, unfortunately it's not
that easy to achieve from within .NET. Also, services should be as robust as
possible, but <rant>.NET has changed this picture, seems like everyone needs
to write a bunch of services these day's :-). Most of the time they crash or
hang or exhaust precious system resources, but no trouble start another one
when the first fails....</rant>
Willy.

"Vadym Stetsyak" <va*****@ukr.ne twrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
| Hello, ha*****@gmail.c om!
|
|
| [skipped]
|
| hMy target is basically to implement survivability of my project so if
| hthe service will "fall down" another process / user will be able to
| hcontinue.
|
| hDoes someone have any idea ??
|
| You can start several windows services with different names, if one fails
another starts operaing
| instaed of "dead" one.
|
| --
| Regards, Vadym Stetsyak
| www: http://vadmyst.blogspot.com
Aug 23 '06 #5

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

Similar topics

6
6591
by: Dan | last post by:
I wish to replace all the occurrances of " with &quot; within a string. I have tried using myString.Replace("\"", "&quot;"), but this does not work Any suggestions will be greatly appreciated Thanks
3
1632
by: Claire | last post by:
Sorry for such a daft question. Ive been following some tutorials on creating windows services. Ive not done them before. In my original debuggable windows form application, I create my worker classes. The classes 'run' themselves using several threads and only stop when the form is closed. Now I've used these worker classes in the service...
3
2544
by: Michael Tkachev | last post by:
Hello, I need to create an "Excel" file in the ASP.net. But a security system doesn't allow to do it. What can I do? There is an exception heppens when I try to execute the following row: Excel.ApplicationClass c = new Excel.ApplicationClass(); Exception Details: System.UnauthorizedAccessException: Access is denied. ASP.NET is not...
1
1444
by: bruce | last post by:
hi. within python, what's the best way to automatically spawn an app as a given user/group. i'm testing an app, and i'm going to need to assign the app to a given user/group, as well as assign it certain access rights/modes (rwx) i then want to copy the test app to a given dir, and then spawn a process to run the app..
17
2400
by: Chen Shusheng | last post by:
Hi all, In fact, I want to let my memory run out. And see what will happen. My system is windowsXp. Memory is 256M.I think my cdes will apply more memory than I have. Codes are below: #include <stdlib.h> #include<stdio.h> #define MAX 1000000000
2
1831
by: Travich | last post by:
I have a .NET 1.1 WinForms application that used to only hit SQL Server 2000. We are now contemplating moving to SQL Server 2005. To test this, we set up a SQL Server 2005 box and installed the web services and client application on the same box. When the application tries to call a web service that it could normally call in the past, it...
11
8304
by: jjw92 | last post by:
I've been banging my head against the wall with this one for a couple days so I'm hoping someone has some ideas. I have a web service that I created that is called by a .NET class library (which in turn is called by another application). This all works fine in my development environment. Test environment: Windows Server 2003, ASP 6.0, .NET...
1
1418
by: rsennat | last post by:
Hi All, How can I implement the unix "more", in my application. I would be printing a huge amount of data to the console. While doing so, how can I get the size of the console and accordingly give the more prompt and wait for user input keys to scroll further. Any ideas?? Thanks Senthil Nathan R
11
5033
by: Jan | last post by:
Hi: Here's a problem I've had for a long time. The client is really running out of patience, and I have no answers. Access2003, front- and back-end. Single form with 4 subforms (each representing a related table), 5-10 clerks doing data entry at one time. Tables are quite large but all work is done with unbound forms and/or local...
0
7504
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...
0
7435
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...
0
7694
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. ...
1
7461
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...
0
6026
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
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...
0
5080
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...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
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 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.