473,434 Members | 1,349 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.

thread pool services

i wrote a windows service that runs thread pool. I have 2 xp pc and it
attempts to check on 2 pc Messenger service.

Pc1 where my vb service program is run.
pc2 .

When the thread goes to pc1 and if Messenger service is stopped, it will
attempt to start
When the thread goes to pc2 and if Messenger service is stopped, it will
not atttempt to start.

Does servicecontrollerstatus works on locally on machine that my vb service
is run, ie on pc 1 and cannot do remotely ie on pc 2 ?
On pc2, i check the security event log that pc1 has attempt to logon to
start the service, but ends up with "Failure audit".
any advice ?

=================
sercurity eventlog in pc2
=================

Object Open:
Object Server: SC Manager
Object Type: SERVICE OBJECT
Object Name: Messenger
Handle ID: -
Operation ID: {0,20496030}
Process ID: 736
Image File Name: C:\WINDOWS\system32\services.exe
Primary User Name: pc2$
Primary Domain: xxx
Primary Logon ID: (0x0,0x3E7)
Client User Name: pc1$
Client Domain: xxx
Client Logon ID: (0x0,0x13850A4)
Accesses: Start the service

Privileges: -
Restricted Sid Count: 0

=============================
'sample code
=============================

Dim svcstatus As System.ServiceProcess.ServiceControllerStatus

If svcstatus = ServiceControllerStatus.Stopped Then
Try
Me.m_svccontrol.Start()
m_wEvents.Source = servername & " Success"
m_wEvents.WriteEntry(servername & " started successfully.")
Catch ex As Exception
m_wEvents.Source = servername & " Fail"
m_wEvents.WriteEntry(servername & " was stopped.",
EventLogEntryType.Error)
Exit Sub
End Try
End If
Nov 23 '05 #1
1 1069
MVP, able to assist ?

Or it there a url i can lookup ?

"James" <jk****@hotmail.com> wrote in message
news:ug**************@TK2MSFTNGP10.phx.gbl...
i wrote a windows service that runs thread pool. I have 2 xp pc and it
attempts to check on 2 pc Messenger service.

Pc1 where my vb service program is run.
pc2 .

When the thread goes to pc1 and if Messenger service is stopped, it will
attempt to start
When the thread goes to pc2 and if Messenger service is stopped, it will
not atttempt to start.

Does servicecontrollerstatus works on locally on machine that my vb
service is run, ie on pc 1 and cannot do remotely ie on pc 2 ?
On pc2, i check the security event log that pc1 has attempt to logon to
start the service, but ends up with "Failure audit".
any advice ?

=================
sercurity eventlog in pc2
=================

Object Open:
Object Server: SC Manager
Object Type: SERVICE OBJECT
Object Name: Messenger
Handle ID: -
Operation ID: {0,20496030}
Process ID: 736
Image File Name: C:\WINDOWS\system32\services.exe
Primary User Name: pc2$
Primary Domain: xxx
Primary Logon ID: (0x0,0x3E7)
Client User Name: pc1$
Client Domain: xxx
Client Logon ID: (0x0,0x13850A4)
Accesses: Start the service

Privileges: -
Restricted Sid Count: 0

=============================
'sample code
=============================

Dim svcstatus As System.ServiceProcess.ServiceControllerStatus

If svcstatus = ServiceControllerStatus.Stopped Then
Try
Me.m_svccontrol.Start()
m_wEvents.Source = servername & " Success"
m_wEvents.WriteEntry(servername & " started successfully.")
Catch ex As Exception
m_wEvents.Source = servername & " Fail"
m_wEvents.WriteEntry(servername & " was stopped.",
EventLogEntryType.Error)
Exit Sub
End Try
End If

Nov 23 '05 #2

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

Similar topics

3
by: David Sworder | last post by:
This message was already cross-posted to C# and ADO.NET, but I forgot to post to this "general" group... sorry about that. It just occured to me after my first post that the "general" group readers...
7
by: David Sworder | last post by:
Hi, I'm developing an application that will support several thousand simultaneous connections on the server-side. I'm trying to maximize throughput. The client (WinForms) and server communicate...
14
by: Brian Keating EI9FXB | last post by:
I wonder can anyone reccomment a solution to this problem. Let me explain, I've services running on my system, my application receives diagnostic messages from these services, what i want to do...
1
by: Gawel | last post by:
Using Thread.CurrentThread.GetHashCode() and AppDomain.GetCurrentThreadId() I observerd that a few requests are serverd by the same thread. Usually 3-5 requests. Is it possible to force, that...
5
by: admin | last post by:
ok This is my main. Pretty much it goes through each category and starts up 4 worker threads that then ask for groups to gether from. My problem is that when the thread gets done it keeps the...
0
by: roni schuetz | last post by:
since a few day's i'm running around the problem that I stocked with a change i need to do. hopefully somebody here can give me a tipp which will be usefull to solve my problem. I'm using a...
1
by: richard.hallgren | last post by:
Hi, I have some questions concerning thread pools. I've marked the questions by number in the text. First I'd like to know when which thread pools an application uses. I know ASP.NET uses the...
1
by: Navin Mishra | last post by:
Hi, I've an ASP.NET web service that consumes other web services as well as sends data to client using TCP blocking sockets on a custom thread pool threads. If I use asynchronous sockets to send...
34
by: Creativ | last post by:
Why does Thread class not support IDisposable? It's creating quite some problem. Namely, it can exhaust the resource and you have not control over it.
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
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
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...
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...
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...

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.