none
Could not start windows service?

    Question

  • Hi,

       I have created WCF service and i am trying to hosting it using Windows Services....I build the service and installed the service using "installutil.exe"

       The problem is i couldn't start it as "network service" if i try to start it i am getting this error

    "Windows could not start the service on local computer Error 5: Access is denied"  

       But if i change the log on as option to "local services" then its starting.... 

     

       I am following the tutorial in this link : http://www.dotnetspark.com/kb/2096-step-by-step-hosting-wcf-service-with-nettcpbinding.aspx


    A.Navarajan

    Wednesday, March 14, 2012 2:21 PM

Answers

  •   Its working... I shared that service and gave full control to Network Service...now the service is started...

    A.Navarajan

    Thursday, March 15, 2012 7:29 AM

All replies

  • There are 3 types of services running mode:

    1) Local System (more privileges)

    2) Local Service

    3) Network Service

    The reason for error on network service could be insufficient privileges for the account.

    You can try changing the following:

       a) The port of the service

       b) Windows Firewall options allowing the application to communicate outwards

       c) Properties > Account Credentials



    Resolving n Evolving in C# (http://jeanpaulva.com)

    Wednesday, March 14, 2012 4:22 PM
  • a) I changed the port in the app.config file and build it ...not working

    b) I added the service1.exe file in Firewall to allow outbound connection...not working

    c) I dont know how to change account credentials for 'Network Service'

       


    A.Navarajan

    Wednesday, March 14, 2012 5:02 PM
  • Exactly how are you starting the service? It looks like you're trying to start it programmatically from code that doesn't have the right privilege. If your code is starting it then it needs to be administrator privilege (with an elevation manifest).

    Phil Wilson

    Wednesday, March 14, 2012 10:53 PM
  • hi PhilWilson,

                  i am  following this steps-->  http://www.dotnetspark.com/kb/2096-step-by-step-hosting-wcf-service-with-nettcpbinding.aspx

                 I am starting the services from services.msc.... I think the proble with Network Service logon method  because its starting when i change the log on as to Local System....


    A.Navarajan

    Thursday, March 15, 2012 6:19 AM
  •   Its working... I shared that service and gave full control to Network Service...now the service is started...

    A.Navarajan

    Thursday, March 15, 2012 7:29 AM