473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Code seems not to execute in Windows service

I have a strange problem in my dotnet Windows service:

I have developed a service, using the core of the "windows service
sample" found all over the net. Its like:

....

############
Protected Overrides Sub OnStart(ByVal args() As String)

....
..Do some init stuff ..
....
'initialize a timer
JobTimer.Interval = 10000 '10 sec
JobTimer.Enabled = True
....

End Sub
############

In my timer - eventhandler function the first statement is to post "Hi
im there". For different reasons i use the "old" adodb - COM classes
to access my database. So i have added adodb (V2.7) in the reference
dialog to my project.

############
Private Sub JobTimer_Elapsed(...) Handles JobTimer.Elapsed
m_LogFile.WriteLine("Hello World")
m_LogFile.Flush()

...
Dim rs As ADODB.Recordset
rs = New ADODB.Recordset()

...

End Sub
############

So far so good - the code works fine on my (win2000) system and on
another system (where dotnet-studio is installed as well).

B U T - deploying it to a naked (win2000) system where only my exe and
the dotnet-runtime (and of course MDAC27) is installed something
strange happens:

It seems that the whole timer-eventfunction does not execute. The
first WriteLine does not come out. If I comment out the "rs = new
ADODB.Recordset()" line, the logmessages come out again. Also if I
replace the "new" command by a "CreateObject" command the logmessages
are displayed.

Even if the logmessages are not displayed, the service stayes allive
(it reacts proper to the SCM commands). There are no messages in event
log.
What am I doing wrong?
Helmut
Jul 21 '05 #1
0 1348

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

Similar topics

1
by: stewert gallington | last post by:
Im running some pretty straight forward code. Mainly database access (SQL7) doing inserts and sometimes when the script runs it halts the IIS service dead in its tracks. Before the page can even...
4
by: Programmer | last post by:
I'm at my witts end! I've written a Windows service using VS.NET 2K3. It's a service that is basically a TcpListener. When I telnet to it, the text responses the service gives back are not even in...
2
by: Juan Manuel Alegría B. | last post by:
Hi group I have been making a windows service to execute an external application. I use a timer control, I can execute the application but does't appear as a normal windows, just I see it in the...
2
by: lu1219 | last post by:
I am currently running IIS 5.1, Windows XP Pro with service pack 2. When I try to run an ASP page I get an error saying that 403.1 Execut Access Forbidden - IIS. There are no firewalls up and...
0
by: Layne L via DotNetMonster.com | last post by:
Trying to install a .NET application on a Windows 2003 Server ( .NET v1.1) and for any . aspx file get the following error: 403.1 Forbidden: Execute Access Forbidden The application has...
7
by: hazz | last post by:
What happens if I set the timer interval for a period that is less than the time it will take to process the loop below? Right now my application is returning just a few items in an arraylist to...
0
by: Helmut | last post by:
I have a strange problem in my dotnet Windows service: I have developed a service, using the core of the "windows service sample" found all over the net. Its like: .... ############...
1
by: Daniel | last post by:
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific...
15
by: dylpkls91 | last post by:
I have been researching this topic and come up with some code to make it work. It uses SSL and requires the 3rd party package Paramiko (which requires PyCrypto). However, at this moment I have no...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.