Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6336307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:01:56+00:00 2026-05-24T19:01:56+00:00

I have a windows service that has been running. I have created a new

  • 0

I have a windows service that has been running. I have created a new version of the application. I went to the windows server and stopped the service. I then copied in the new .exe for the service and tried to start the service. The service won’t start, it times out trying to start and I can’t figure out why. I am positive that I have done this before. Do I need to uninstall the service and reinstall it?

Server: Windows Server 2003 R2
Application .NET Version: 2.0
Developed With: VS 2005
Language VB.NET

OnStart Method:

Protected Overrides Sub OnStart(ByVal args() As String)
    ' Add code here to start your service. This method should set things
    ' in motion so your service can do its work.
    Me.Timer1.Enabled = True
End Sub

InitializeComponent:
CHECKDB_INTERVAL_TIME = 10

Private Sub InitializeComponent()
    Dim iWaitTime As Int16
    iWaitTime = CType(ConfigurationManager.AppSettings("CHECKDB_INTERVAL_TIME"), Int16)
    Me.components = New System.ComponentModel.Container
    Me.Timer1 = New System.Timers.Timer()
    Me.Timer1.Interval = iWaitTime * 60000
    '
    'HarleyCloser
    '
    Me.ServiceName = "MyService"

End Sub

Friend WithEvents Timer1 As System.Timers.Timer

I found the issue. The problem was with a directive that was being used to do something different in Debug mode versus Release mode.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:01:57+00:00Added an answer on May 24, 2026 at 7:01 pm

    I found the Issue. There was some code hidden in the service with a Debug Directive. If the service was compiled in Debug then it ran like a console application, if it was compiled in Release, then it ran as a service. So the Service was timing out on the OnStart because it was trying to run the whole console application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a windows service that has been happily running in production for over
I have a windows service running on a server (that I would rather not
I have a fairly stable server application version that's been deployed for nearly a
I have a WCF service that is called by a Windows Mobile application running
I have a windows service that has it's name set by an app.config. I
I have a ASP.NET 1.1 application running on IIS 6 / Windows Server 2003.
We have a Quartz.Net installation running as a Windows Service. That's running fine. We
I have a Windows service that has a number of threads that all need
I have a windows service that I have been writing in Vb.Net. As part
I have a server hosting a remoting application using .NET 3.5. It has been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.