473,396 Members | 1,975 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,396 software developers and data experts.

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.ServiceProcess.ServiceBase[] {new
Service1(), new MySecondUserService()};
//

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 2703
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.ServiceProcess.ServiceBase[] {new
Service1(), new MySecondUserService()};
//

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.com!


[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.netwrote in message
news:%2****************@TK2MSFTNGP02.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.netwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
| Hello, ha*****@gmail.com!
|
|
| [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
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 ...
3
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...
3
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: ...
1
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...
17
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: ...
2
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...
11
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...
1
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...
11
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
1
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...
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
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...
0
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
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...

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.