473,573 Members | 2,893 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 2716
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
6594
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
1633
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
1445
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
2403
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
1834
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
8309
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
1421
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
5036
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
7781
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
7699
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
8027
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
7788
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
8066
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5594
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
5292
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...
1
1304
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1041
bsmnconsultancy
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...

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.