Cannot start service from command line error for WCF application


Alex. O. Koranteng

I am getting the error below when I the servicehost project from my WCF
application. Will appreciate any suggestions.

Cannot start service from comman line, the windows service must be installed.




Steven Cheng

Hi Alex,

From your description, it seems you're using a windows service hosted WCF
service project. For windows service project, you cannot directly launch it
via F5 or double clicking the exe file. You need to install the windows
service program first. If you're not familar with .NET based windows
service and how to install it, here are some articles which are helpful to

#Simple Windows Service Sample

#Installing and Uninstalling Services

Also, for WCF service hosted in windows service application, here are some
introduction articles(including screencast) which can guide you on how to
create a windows service hosted WCF service:

#How to: Host a WCF Service in a Managed Windows Service

#Screencast: Hosting WCF services in Windows Services


Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

Get notification to my posts through email? Please refer to

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
This posting is provided "AS IS" with no warranties, and confers no rights.


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