Windows Service Project Not Starting On Different Machine

Hi guys,
I have a problem. I've got a service c sharp/.NET project on one computer. I can build the project and install the service using installutil and its all good. However, I really need that project on my other machine. I have exported the environment settings from the machine where it all works to to the new machine and copied the all files but the service does not start up. Keeps throwing me a 1067 error when i try to start it. i have tried this on a virtual  machine, on parallels and on bootcamp. All running windows 7 64bit.

If anyone could direct me to a solution that would be great thanks.
LVL 1
R0y4LAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rahul GadeSr. ArchitectCommented:

The error appears when your service gets crashed and some uncaught exceptions are thrown. This may happen even the appropriate .Net runtime is not available or user permission under whose profile the service is configured to run has insufficient rights.
In order to investigate further, run the service as a console application for which you just need to comment ServiceMain and add our normal main.
If this still crashes, you will get the appropriate reasoning in the console (i.e. Stack Trace).
If this doesn't crash, means you definitely have problems with user credentials.

-Rahul Gade
0
R0y4LAuthor Commented:
herryhelp - no there is no database connection. The only connection there is, is a USB connection to a barcode scanner device.

Rahul Gade - this is my main, what should I change?

namespace GuestinationService
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[] 
			{ 
				new GuestinationVenderService() 
			};
            ServiceBase.Run(ServicesToRun);
        }
    }
}

Open in new window


0
Rahul GadeSr. ArchitectCommented:
Comment this entire block and add another main function that will just give a call to the function in you code that actual start functional part of your code execution. So, this become a simple console app to help debugging.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.