Need Help With Windows Service Install

  • Thread starter Thread starter pbd22
  • Start date Start date
P

pbd22

Hi.

I built a windows service using C#/2005 on a DEV
machine and am a little confused about moving the
service to a production server.

I have successfully installed (installutil) and run the
service on my XP dev machine.

When I install and run it on the 2003 box, I get a
"start and stop - nothing to do" error.

To me, this means there is a wrong file path or
something of that nature. But, I reproduced the
file paths on the XP box and everything checks
out.

So. my thoughts turned to the EXE, DLLS, etc.
On the 2003 box I have just included myservice.exe
and the DLLs in the same folder. But, In my DEV project,
I see BIN, OBJ, and PROPERTIES folders.

I know I need to use the release EXE from my
project when I move to production, but do I need
to include the properties folder or the OBJ folder?
I assumed i just needed to move the Bin/Release/myproj.exe
file and its associated DLLs to the production server.
I also notice that the DLLs are referenced in the OBJ
folder in my project (there is no OBJ folder in the production
server). Is this going to mess things up?

Please help me sort this out - I know my service works.

Thanks.
 
Hi.

I built a windows service using C#/2005 on a DEV
machine and am a little confused about moving the
service to a production server.

I have successfully installed (installutil) and run the
service on my XP dev machine.

When I install and run it on the 2003 box, I get a
"start and stop - nothing to do" error.

To me, this means there is a wrong file path or
something of that nature. But, I reproduced the
file paths on the XP box and everything checks
out.

So. my thoughts turned to the EXE, DLLS, etc.
On the 2003 box I have just included myservice.exe
and the DLLs in the same folder. But, In my DEV project,
I see  BIN, OBJ, and PROPERTIES folders.

I know I need to use the release EXE from my
project when I move to production, but do I need
to include the properties folder or the OBJ folder?
I assumed i just needed to move the Bin/Release/myproj.exe
file and its associated DLLs to the production server.
I also notice that the DLLs are referenced in the OBJ
folder in my project (there is no OBJ folder in the production
server). Is this going to mess things up?

Please help me sort this out - I know my service works.

Thanks.

Am not familiar with this particular error, but there are a few things
you can check.

First of all, as regards what you release, in the simplest case you
basically just need to release the contents of your bin\debug or bin
\release folders. But to be honest it may be worth just creating a
simple setup project - this will automatically suck in the
dependencies so makes life easier as things get more complex.

Next, on your "live" machine, check the registry to see if it the
service got registered properly. HKLM\System\CurrentControlSet
\Services

Next, when you say "run" you actually mean "start", right? You're
starting and stopping this thing from under Administrative Tools
\Services, yes?

From there, other problems which may be likely could be e.g.
permissions on the server, or you may simply need to add some
diagnostic code which blasts out to the event log or something. But
make sure your service is installed properly before trying this.

hth
 
Back
Top