473,378 Members | 1,360 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,378 software developers and data experts.

Windows Service : Timer - Should it work ???

I have a Windows Service and I am using a Timer on it with an interval of 10
seconds. The assembly has full trust and the service is running under the
localmachine permission.

In the timer tick I have the following code.

Dim fs As New System.IO.FileStream("C:\ticking.txt", IO.FileMode.Append)

Dim sw As New System.IO.StreamWriter(fs)

sw.WriteLine("im tickin")

sw.Flush()

///

I have the timer enabled and have used the

Timer1.Start() in the OnStart sub routine.

It does not work, any ideas !!!!!!!!!!!!
Nov 21 '05 #1
5 1048
"Mr Newbie" <he**@now.com> schrieb:
I have a Windows Service and I am using a Timer on it with an interval of
10 seconds.


Which timer class do you use?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Herfried,

If you look in the newsgroup than you can see that it was a windows form
timer.
Please keep the answers to the original thread.

Thanks in advance

Cor

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schreef in bericht
news:ee**************@TK2MSFTNGP15.phx.gbl...
"Mr Newbie" <he**@now.com> schrieb:
I have a Windows Service and I am using a Timer on it with an interval of
10 seconds.


Which timer class do you use?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
Mr Newbie,

To get the best answers you can better keep your questions to the original
threads, than everybody can see what answers are already given. This is not
a new subject.

Thanks in advance

Cor

"Mr Newbie" <he**@now.com> schreef in bericht
news:%2****************@TK2MSFTNGP14.phx.gbl...
I have a Windows Service and I am using a Timer on it with an interval of
10 seconds. The assembly has full trust and the service is running under
the localmachine permission.

In the timer tick I have the following code.

Dim fs As New System.IO.FileStream("C:\ticking.txt", IO.FileMode.Append)

Dim sw As New System.IO.StreamWriter(fs)

sw.WriteLine("im tickin")

sw.Flush()

///

I have the timer enabled and have used the

Timer1.Start() in the OnStart sub routine.

It does not work, any ideas !!!!!!!!!!!!

Nov 21 '05 #4
"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
If you look in the newsgroup than you can see that it was a windows form
timer.
Please keep the answers to the original thread.


I don't read every thread posted to this group...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #5
Very sorry to have made this error. I am soldiering on with the other timer
classes now and having not much more success. However, it appears to be very
hit and miss as to if the service will run at all and if debugging allways
works.

Very crap I must say ;-(

Thanks to all for your assistance.
Regards - Mr Newbie

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ey**************@TK2MSFTNGP14.phx.gbl...
Mr Newbie,

To get the best answers you can better keep your questions to the original
threads, than everybody can see what answers are already given. This is
not a new subject.

Thanks in advance

Cor

"Mr Newbie" <he**@now.com> schreef in bericht
news:%2****************@TK2MSFTNGP14.phx.gbl...
I have a Windows Service and I am using a Timer on it with an interval of
10 seconds. The assembly has full trust and the service is running under
the localmachine permission.

In the timer tick I have the following code.

Dim fs As New System.IO.FileStream("C:\ticking.txt", IO.FileMode.Append)

Dim sw As New System.IO.StreamWriter(fs)

sw.WriteLine("im tickin")

sw.Flush()

///

I have the timer enabled and have used the

Timer1.Start() in the OnStart sub routine.

It does not work, any ideas !!!!!!!!!!!!


Nov 21 '05 #6

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

Similar topics

7
by: J. Hill | last post by:
I have a Windows Service with a timer but the .Tick event is not being fired/called. Don't know what code to include...I enabled and started the timer...I have the exact same code in a Windows...
5
by: Dhilip Kumar | last post by:
Hi all, I have developed a windows service using the windows service project template in VS.NET. I have used three controls in the service, a timer, performance counter and a message queue...
3
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My...
3
by: Yves Royer | last post by:
Hi all, I have a little question about Windows Services. For my app i need 3 different Windows Services, each with its own functionality. I'm trying to make a test service to see what happens...
2
by: John David Thornton | last post by:
I've got a Windows Service class, and I put a System.Threading.Timer, and I've coded it as shown below. However, when I install the service and then start it in MMC, I get a peculiar message: ...
5
by: Tom | last post by:
Using multiple System.Timers.Timer objects in a Windows Service for performing multi-thread activities in a periodic fashion. Timers are AutoReset=false, to only have a single timer execution...
4
by: Lemune | last post by:
Hello everyone. I'm using vb 2005. I'm creating program that run as service on windows. And in my program I need to use timer, so I'm using timer object from component. I try my source code on...
0
by: Jason | last post by:
Ok, for the life of me, I just don't understand what's going on. I want to use remoting to send messages from a windows service to a windows form app, but I just can't get it to work. So, here's...
8
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.