Cannot start service from command line error for WCF application


A

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.

Thanks
 
Ad

Advertisements

S

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
you:

#Simple Windows Service Sample
http://www.codeproject.com/KB/dotnet/simplewindowsservice.aspx

#Installing and Uninstalling Services
http://msdn.microsoft.com/en-us/library/aa984379(VS.71).aspx

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
http://msdn.microsoft.com/en-us/library/ms733069.aspx

#Screencast: Hosting WCF services in Windows Services
http://www.pluralsight.com/community/blogs/aaron/archive/2008/12/02/screenca
st-hosting-wcf-services-in-windows-services.aspx

Sincerely,

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
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

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
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
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

Top