473,769 Members | 3,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.NET service always in "starting" mode

Hi everyone

I am trying to write a fairly simple VB.NET service (use a timer to poll a network location for a file, if file exists, send message)

The service correctly start, stops, runs the timer, etc. I can tell this from a custom event log I created, and it adds new entries on start, stop, and each time the timer expires

FYI...sice this is my first service to write, I'm going by the MSDN article at http://msdn.microsoft.com/library/de...application.as

OK, back to topic...when I try to start my service (My Computer --> Manage --> Services & Applications --> Services --> Right-click my service and click "Start"), the progress bar window that appears never completely finishes. I loads the first 50% or so just fine, then does the rest VERY slowly, and never closes. However, if I click "Close", my service status says "Starting", but it is writing entries to the event log as the timer expires, so it is running

Is there something in my code I'm doing wrong that makes it think it never finished loading the service (although it did)

Thanks in advance
Protected Overrides Sub OnStart(ByVal args() As String

logMain.WriteEn try("Service started.", EventLogEntryTy pe.Information

' Setup time
timeQuery.AutoR eset = Tru
' Set for testing. Increase time for deployment
timeQuery.Inter val = 600

' Start time
timeQuery.Start (

End Su
PS - If you think this should be or would get more responses in a different topic, please let me know...
Jul 21 '05 #1
0 1452

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8593
by: Greg Bryant | last post by:
I'm doing some work for a company that has an auction site running in coldfusion. They're not real happy with it, and it needs a major overhaul, so I'm looking at redoing it, and while I'm at it, might as well move to PHP (for a variety of reasons - not trying to reopen the PHP -vs- CFM thing again :). Anyway, so I'm looking at this system, and there are no "scheduled tasks" (it's win2kas). How do you write a server app that needs to...
3
2180
by: Marek | last post by:
Hi there, my WinForm application has to be installed in "no-touch-deployment" mode, so users can run it from the web. I need to read application's .config file but it does not work in no-touch-deployment. Could anyone give me directions to documentation piece (or article) that explains how to implement app .config file reading in no-touch-deployment ? (just to clarif the issue, my app is not ASP.NET) I'd appreciate any help, thank you....
32
3205
by: Christopher Benson-Manica | last post by:
Is the following code legal, moral, and advisable? #include <iostream> class A { private: int a; public: A() : a(42) {}
1
1535
by: Joel Zinn | last post by:
I have a windows service that I am developing in VB.Net and during it start up process, I am checking various things. If there is an error encountered while doing these checks, I would like to halt the startup process (and stop the service) and then also like to disable the service, if possible. I have tried using the ServiceController class to gain access to the service, but when I issue a Stop method, it appears to work, but the...
2
2286
by: n_o_s_p_a__m | last post by:
I run my multithreaded classes (class library) in a standard exe host, works with no problems; but once hosted in SCM, the threads are not spawned, yet no exceptions are thrown. Is this some kind of limitation?
1
1192
by: Tim Smith | last post by:
I have an application for which the main thread apartment threading must be static. This is since it calls a DLL which if I switch to MTAThread it is very slow, and cannot run in a thread as static. Now I want to change my console app to be a windows service and when the service starts, it is always in a 'STARTING' mode. This is primarily due to the eternal while loop. the while loop has of course lots of sleeping in it. Is there...
4
2492
by: Sam | last post by:
Service properties ------------------ Log On As: LocalSystem Logon account has full admin privileges. OnStart() routine ----------------- { EventLog->WriteEntry ("Commencing..."); .... A
0
853
by: pillbug22 | last post by:
Hi everyone I am trying to write a fairly simple VB.NET service (use a timer to poll a network location for a file, if file exists, send message) The service correctly start, stops, runs the timer, etc. I can tell this from a custom event log I created, and it adds new entries on start, stop, and each time the timer expires FYI...sice this is my first service to write, I'm going by the MSDN article at...
1
9651
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9981
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9850
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7396
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5436
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.