I am new to developing services and I am trying to develop a service that can print out labels from something called Codesoft.
I have added a reference to the Codesoft component/server.

I have tried to make at standard Windows forms application with Exactly the same code and it works, but as a service application I get an error like this: "Object reference not set to an instance of an object" I can see the Codesoft component is starting ( when I see Processes in task manager) when I start the service.

Can anyone explain where I put the declarations when it's a Windows Service project?

I am using Visual Studio 2008.


6 Years
Discussion Span
Last Post by kje

Thank you for your reply.
Just a few minutes before, I discovered that the problem was that I installed it under the LocalSystem account and the service is using network drives which it apparently could not. I tried to install it under User account with my own username and then it worked, so you are right, it has something to do with a user.
Now I just have to figure out which user I shall use, because the service shall run on a server.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.