Will .NET 2.0 Windows Services run under Windows 2000?

I have created windows service with VS 2k8 and .net 2.0, and try to install on Windwos 2000 Server and did not work.

I have tried to install it on my local machine XP Professional and was running perfectly. I was wondering why it not running on Win2k. I was able to install the service but when I tried to start it was come up with  Error : “not timely fashion”.

Then I googled the Error Msg and dig few forums I found out that in my windows Service statup CanHandleSessionChangeEvent was set to true. Service will hang on startup, when run under W2k if the OnSessionChange() function is presented and enabled. if you set CanHandleSessionChangeEvent to false it was working perfectly.

That trick saves my day.!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s