Services in .Net

K

Ken Allen

I have developed a couple of services using C#/.Net, and they work quite
well. But recently I have attempted something new and it is not working
so well.

I noticed that one of the capabilities was to host multiple services
from within the same assemnbly/executable. Since this seemed to fit in
with a new set of related services that I wanted to write, I thought I
would experiment with this. I created the project and got it working (in
console mode) with one service, and then added three more. Once I had
that working in debug/console mode, I tried it as an actual service.

Even though I added a project installer and an installer for each
service, when I install the service assembly, it notes that all of the
services are successfully installed, but none of them are started! I
have to go into the service manager and start them manually, at which
point they seem to work. Any ideas what I may be doing wrong?

Also, is there any way to have an installed service direct its output to
a console window? I have not developed services prior to .Net, but
some friends tell me that they have seen older (pre-.Net C++) services
producing output in MFS and console windows. Another person told me that
they have services written in VB6 that have forms displayed as well.

-ken
 
K

Ken Allen

Ken said:
I have developed a couple of services using C#/.Net, and they work quite
well. But recently I have attempted something new and it is not working
so well.

I noticed that one of the capabilities was to host multiple services
from within the same assemnbly/executable. Since this seemed to fit in
with a new set of related services that I wanted to write, I thought I
would experiment with this. I created the project and got it working (in
console mode) with one service, and then added three more. Once I had
that working in debug/console mode, I tried it as an actual service.

Even though I added a project installer and an installer for each
service, when I install the service assembly, it notes that all of the
services are successfully installed, but none of them are started! I
have to go into the service manager and start them manually, at which
point they seem to work. Any ideas what I may be doing wrong?

Also, is there any way to have an installed service direct its output to
a console window? I have not developed services prior to .Net, but some
friends tell me that they have seen older (pre-.Net C++) services
producing output in MFS and console windows. Another person told me that
they have services written in VB6 that have forms displayed as well.

-ken

One other thing - Even if I start the service(s) manually, I cannot find
a way to attach to them from Visual Studio in order to debug the running
service(s). None of the names of the services show up in the list!

-Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top