471,354 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Service never starts only on Windows 2000 Server

A windows service I've created runs on all boxes except Windows 2000
server.

The windows service initializes (i.e., the Service:ServieBase class
gets constructed),
but the OnStart() method never fires.

On the same server, I have another service I've created which runs
just fine. Both services were installed using the Windows Installer,
exactly the same deal... both services run on other machines too.
BTW: when the constructor starts, I log "Service Initializing" at the
top, and "Service Initialized" at the bottom of the constructor, and
both get logged.
BUT THE ONSTART method never fires!
Service status remains forever: "STARTING" I have to kill the
process
to make it go away!
I also am handling AppDomain.CurrentDomain.UnhandledException += ...
but that never fires either.
WORKS on Windows Server 2003, Windows XP, Vista, etc...
DOES NOT WORK in Server 2000.

What gives?
Jun 27 '08 #1
1 1407
I found this on another forum; someone had the same problem and came up with
the following solution:

The following service will hang on startup, when run under Windows 2000,
if the OnSessionChange() function is present and enabled. If the
function is commented out, and CanHandleSessionChangeEvent is set to false,
the service starts up correctly.

CanHandleSessionChangeEvent requires full trust for the immediate caller.
This member cannot be used by partially trusted code.

Hope the above helps - I havent tested this cause I dont have a Win2K box
available right now.

--
Misbah Arefin
https://mcp.support.microsoft.com/profile/MISBAH.AREFIN
http://www.linkedin.com/in/misbaharefin
"ERobishaw" wrote:
A windows service I've created runs on all boxes except Windows 2000
server.

The windows service initializes (i.e., the Service:ServieBase class
gets constructed),
but the OnStart() method never fires.

On the same server, I have another service I've created which runs
just fine. Both services were installed using the Windows Installer,
exactly the same deal... both services run on other machines too.
BTW: when the constructor starts, I log "Service Initializing" at the
top, and "Service Initialized" at the bottom of the constructor, and
both get logged.
BUT THE ONSTART method never fires!
Service status remains forever: "STARTING" I have to kill the
process
to make it go away!
I also am handling AppDomain.CurrentDomain.UnhandledException += ...
but that never fires either.
WORKS on Windows Server 2003, Windows XP, Vista, etc...
DOES NOT WORK in Server 2000.

What gives?
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Victor Marquez | last post: by

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.