CampDev
CampDev

Reputation: 1659

My service won't start when project run

I have a WCF Service hosted in Windows Service, and I installed the Windows Service in my machine across InstallUtil. But when I run my project and I try start my service the service doesn't start.

But when I stop my project in Visual Studio and I try to start service, the service running normally. I don't understand why this happened.

Perhaps is because in my app.config the service and my app.config the WCFService I have the same port for both.

Upvotes: 1

Views: 326

Answers (1)

Szymon
Szymon

Reputation: 43023

You cannot start Windows service projects directly from Visual Studio. You need to install them (using InstallUtil as you did) and run them from Windows.

If you want to debug a Windows service, it has to be running and you can then attach the debugger to its process. You can do that from Debug -> Attach to process menu option.

Upvotes: 1

Related Questions