Hi
I have written a Windows service that sends me an e-mail every three seconds. At first, the e-mail contained the text "Hello". But then I wanted to change the text, so I stopped the service, uninstalled it, changed the source code so that the e-mail should contain the text "Hi there", compiled it and installed it again. But I still get "Hello" every three seconds. Even tried to reboot the computer.
Another problem is that the e-mails don't arrive in real-time. They seem to queue up and get sent as a batch when I stop the service. So if I let the service run for a minute, nothing happens, but when I stop it, I suddenly get a whole lot of e-mails.
Any help would be much appreciated.
Thanks

Two questions about Windows Services
Navin C
My service loops through all files in a directory, and if any of the files are newer than a given datetime, a mail is sent to me.
Now, when I test this in Visual Studio (not running as a service), it works great, but when I run it as a Windows Service, the method that sends the mail is fired twice, with 62 milliseconds in between.
Anyone
The ZMan
It dosn't matter where the mail server is located, there are internals developed into the mail server system to provent flooding. One of the guys in the network area might correct me here but if I understand it correcly, behind the scenes the system net classes and mail create a raw telnet session to the smpt server that you use and send smpt commands to the smtp server. All the system net classes are are a wrapper for these smtp commands.
Learning VB
I solved it by changing the version number.
ShadowOfTheBeast
Aatu
The email problem (arriving in batches), is going to be related to the mail server and how it works, also in the way that you mail client connects and gathers the mail. Also having the mail send in 3 second breaks could be detected as spam by the mail server and slowed down.
ChristopherC
When you say the "installer project", you mean the Setup project, right
My solution looks like this:
Solution TestService (2projects)
TestServiceProject
testservice.cs
testservice_installer.cs
TestService_SetupProject
Dependencies
Primary output
So the installer class and the setup project are two different things, and I don't think you can build the installer class alone.
By the way -- and this might seem trivial --what is the difference between building and rebuilding
Thanks again
Jessica Alba
DanBaumbach
B. Wesley
What about the other thing Why cant I update the service with a new version It's almost like the MSIL code has been cached or something. And it doesn't matter if I reboot the system.
Thanks guys