Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. windows service

windows service

Scheduled Pinned Locked Moved C#
questionsysadminperformancediscussion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arkiboys
    wrote on last edited by
    #1

    Hi, On my local machine I have admin rights. I run a windows service and it works fine with correct results... Now I would like to run the service under a different account. So I created an account i.e userTest which is on the domain on the network. Then added this userTest to my machines admin users. Question: I do not know why the service does not run under this user's account. When I try to start the service, the message is: "Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service." Any thoughts please? Regards

    L K realJSOPR 3 Replies Last reply
    0
    • A arkiboys

      Hi, On my local machine I have admin rights. I run a windows service and it works fine with correct results... Now I would like to run the service under a different account. So I created an account i.e userTest which is on the domain on the network. Then added this userTest to my machines admin users. Question: I do not know why the service does not run under this user's account. When I try to start the service, the message is: "Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service." Any thoughts please? Regards

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      So what does it say in the Eventlog?

      xacc.ide - now with TabsToSpaces support
      IronScheme - 1.0 alpha 4a out now (29 May 2008)

      A 1 Reply Last reply
      0
      • L leppie

        So what does it say in the Eventlog?

        xacc.ide - now with TabsToSpaces support
        IronScheme - 1.0 alpha 4a out now (29 May 2008)

        A Offline
        A Offline
        arkiboys
        wrote on last edited by
        #3

        User Logoff: User Name: userTest Domain: domainName Logon ID: (0x0,0x7493371) Logon Type: 5

        L 1 Reply Last reply
        0
        • A arkiboys

          User Logoff: User Name: userTest Domain: domainName Logon ID: (0x0,0x7493371) Logon Type: 5

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          Nope, not that, look for an exception caused by the service. Or even better, attach a debugger and see what happens.

          xacc.ide - now with TabsToSpaces support
          IronScheme - 1.0 alpha 4a out now (29 May 2008)

          A 1 Reply Last reply
          0
          • L leppie

            Nope, not that, look for an exception caused by the service. Or even better, attach a debugger and see what happens.

            xacc.ide - now with TabsToSpaces support
            IronScheme - 1.0 alpha 4a out now (29 May 2008)

            A Offline
            A Offline
            arkiboys
            wrote on last edited by
            #5

            Hi, There is no exception.

            1 Reply Last reply
            0
            • A arkiboys

              Hi, On my local machine I have admin rights. I run a windows service and it works fine with correct results... Now I would like to run the service under a different account. So I created an account i.e userTest which is on the domain on the network. Then added this userTest to my machines admin users. Question: I do not know why the service does not run under this user's account. When I try to start the service, the message is: "Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service." Any thoughts please? Regards

              K Offline
              K Offline
              Kjetil Svendsen
              wrote on last edited by
              #6

              arkiboys wrote:

              "Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service."

              This mean that the service has done what it was programmed to do and exited. My guess is that there are some user property that prevents this user from doing the actual work inside the service: -Searching for a file in the wrong directory -Doesn't have the right settings -Hasn't mapped the correct network drive etc Kjetil

              realJSOPR 1 Reply Last reply
              0
              • K Kjetil Svendsen

                arkiboys wrote:

                "Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service."

                This mean that the service has done what it was programmed to do and exited. My guess is that there are some user property that prevents this user from doing the actual work inside the service: -Searching for a file in the wrong directory -Doesn't have the right settings -Hasn't mapped the correct network drive etc Kjetil

                realJSOPR Offline
                realJSOPR Offline
                realJSOP
                wrote on last edited by
                #7

                It could also mean that the service stopped prematurely (crashed, or something else).

                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                1 Reply Last reply
                0
                • A arkiboys

                  Hi, On my local machine I have admin rights. I run a windows service and it works fine with correct results... Now I would like to run the service under a different account. So I created an account i.e userTest which is on the domain on the network. Then added this userTest to my machines admin users. Question: I do not know why the service does not run under this user's account. When I try to start the service, the message is: "Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service." Any thoughts please? Regards

                  realJSOPR Offline
                  realJSOPR Offline
                  realJSOP
                  wrote on last edited by
                  #8

                  Services aren't role-based. They're account based. You have to install it for the account you want to use it under, and then log on with that account. Go into the service manager, and change the user account to the desired one.

                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                  -----
                  "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                  A 1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    Services aren't role-based. They're account based. You have to install it for the account you want to use it under, and then log on with that account. Go into the service manager, and change the user account to the desired one.

                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                    A Offline
                    A Offline
                    arkiboys
                    wrote on last edited by
                    #9

                    Solved. Thanks guys.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups