Windows Service using VB.Net automatic startup problem !

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ravi Shankar

    #1

    Windows Service using VB.Net automatic startup problem !

    Hello,

    I have written a service using VB.Net which is basically a asynch socket
    listener. I have been able to install it successfully. Using the Service
    Control Manager I am able to start & stop the service successfully. Once
    started, the service is responding to requests. The service runs under a user
    a/c (the user is part of the local administrators group).

    I have set the ServiceDependsO n to TCP/IP Protocol Driver, Event Log, Remote
    Procedure Call (RPC) and AD Network Support Services (something like that).

    after all this when I boot the system the service does NOT start and in the
    event log I get a "Service did not respond in a timely fashion" message.

    Suggestions ? (if I'm in the wrong place then please tell me which NG should
    this go to)
    --
    Ravi Shankar
  • Charlie Brown

    #2
    Re: Windows Service using VB.Net automatic startup problem !

    I don't know if this will help you or if it applies to you, but I have
    the same problem when I have event logging in my service as well.

    Comment

    • Kevin Yu [MSFT]

      #3
      RE: Windows Service using VB.Net automatic startup problem !

      Hi Ravi,

      Are you starting the service automatically or manually? If it fails on boot
      up, can you try to start the service manually?

      Kevin Yu
      Microsoft Online Community Support

      =============== =============== =============== =============== =============== =
      =============== ===========
      When responding to posts, please "Reply to Group" via your newsreader so
      that others may learn and benefit from your issue.
      =============== =============== =============== =============== =============== =
      =============== ===========

      (This posting is provided "AS IS", with no warranties, and confers no
      rights.)

      Comment

      • Ravi Shankar

        #4
        RE: Windows Service using VB.Net automatic startup problem !

        Hi Kevin,

        From the Service Control Manager I could start the service manually without
        any problems.

        However, I did one thing today and it has started working. Following
        "Charlie Browns" comment I removed the "Event Log" from the Service Design
        sheet. Instead I started using the Me.EventLog for logging events and the
        service started up just fine... god knows why but I've decided to leave it at
        that :)
        --
        Ravi Shankar


        "Kevin Yu [MSFT]" wrote:
        [color=blue]
        > Hi Ravi,
        >
        > Are you starting the service automatically or manually? If it fails on boot
        > up, can you try to start the service manually?
        >
        > Kevin Yu
        > Microsoft Online Community Support
        >
        > =============== =============== =============== =============== =============== =
        > =============== ===========
        > When responding to posts, please "Reply to Group" via your newsreader so
        > that others may learn and benefit from your issue.
        > =============== =============== =============== =============== =============== =
        > =============== ===========
        >
        > (This posting is provided "AS IS", with no warranties, and confers no
        > rights.)
        >
        >[/color]

        Comment

        • Ravi Shankar

          #5
          Re: Windows Service using VB.Net automatic startup problem !

          Hi Charlie Brown,

          Your observation got me thinking and from the Service Design Sheet I deleted
          the EventLog component. I then changed the code of my service to start using
          me.EventLog to write to the error log.

          NET RESULT - The service started (without any errors) when I rebooted the
          system. Just to make sure I rebooted & rebooted and it still worked :)))
          --
          Ravi Shankar


          "Charlie Brown" wrote:
          [color=blue]
          > I don't know if this will help you or if it applies to you, but I have
          > the same problem when I have event logging in my service as well.
          >
          >[/color]

          Comment

          • Kevin Yu [MSFT]

            #6
            RE: Windows Service using VB.Net automatic startup problem !

            It was nice to hear that you have had the problem resolved.

            Thanks for sharing your experience with all the people here. If you have
            any questions, please feel free to post them in the community.

            Kevin Yu
            Microsoft Online Community Support

            =============== =============== =============== =============== =============== =
            =============== ===========
            When responding to posts, please "Reply to Group" via your newsreader so
            that others may learn and benefit from your issue.
            =============== =============== =============== =============== =============== =
            =============== ===========

            (This posting is provided "AS IS", with no warranties, and confers no
            rights.)

            Comment

            • Charlie Brown

              #7
              Re: Windows Service using VB.Net automatic startup problem !

              I will have to try that workaround myself. Glad to know it helped.

              Comment

              Working...