Link to home
Start Free TrialLog in
Avatar of splavik
splavik

asked on

Windows Service - Acting strange in Server 2003


Hi all,

Created a VB.Net Windows Service -

quick timer - some quick File IO (opens file, writes a line to it)

the basics have been taken from this site : http://www.codeguru.com/vb/gen/vb_system/services/article.php/c4825/

using .Net Framework 1.1.4322 (to be exact)

anyway here is the deal (development machine = winxp pro)
machine this is supposed to run on = win 2003 server

so, on winxp pro everything works great, on win2003 server i can start the service and all, and it shows
running, but it does NOT generate any Event Logs (other then "succesfully started" and stopped) nor it throws an error
nor it writes to the file i want to write into which simply located in C:\File.txt

any ideas why Win 2003 would not let me do some of the things?

cheers
Avatar of splavik
splavik

ASKER

Never mind figured it out....

I did find a few things about this, ultimately it was my "forgetful mind"

here is what i did find on this subject
below is an excerpt from another venue:
>We have finally managed to figure out the problem.
>System.Management.dll does not have permission to the "Local Service"
>and "Network Service" accounts automatically in W2k3 Server, but it
>does in XP. Once I added these accounts my code runs fine.

Ultimately my problem was this, when i copied the files over to a different folder, i just copied the .exe that was
the Windows Service, what i have forgotten about were any DLL's that were in my /bin directory
as well as (and this is the BIG KICKER) the service.exe.config and service.pdb (don't know if this is really necessary but why not)

so i hope this helps other ppl out there... cheers


ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial