hello,
i build a application whos watching a directory. if something changed
on this directory, a event will raise(check the files and delete
some...)
i build that appliaction, one time with "filesystemwatcher" and one
time with "Timer" -- both are working correctly....
but if i change this application, to build a windowsservice - no more
event will be raise.... and i dont know, where the failure is.....
i tryd to build a webservice, how display a messagebox all 10
seconds-.. but it dont work(timer is enabled!!)
i register that windows-service correctly .. and i can start it
without problems on my windows-services......
so, who knows, where the failure is--- or who have any idea to fix
that problem
i used framework 1.0 and visual studio.net
please help me!
any suggestions?
best regards
tommy
Derrick [MCSD] - 14 May 2004 15:58 GMT
Hi Tommy,
Kamran's right, the Windows Service is prohibited from presenting a UI
(consider the case when nobody is logged into the workstation). I have
written Windows Services that use the FileSystemWatcher class and know that
these work correctly in a service.
I would recommend that you log an event to either the Application log or to
a custom log.
If you have access to the book "Coding Techniques for Microsoft Visual Basic
.NET" by John Connell, chapter nine deals with exactly your issue and has a
complete code section that you can use.
HTH,
Derrick
> hello,
>
[quoted text clipped - 26 lines]
>
> tommy
RASTA - 17 May 2004 17:40 GMT
hello derrick,
"Coding Techniques for Microsoft Visual Basic
.NET" by John Connell
YES - i have it!
one time the english version on ebook, the german version in bookform.
i ?ve tested it. many smaller failures, like "msgbox cannot display with
windowsservice" and so on
now it works fine
thank you very much for helping
regards
Tommy
----------------------------------------
HangulHanjaFastConversion-Eigenschaft
True if Microsoft Word automatically converts a word with
only one suggestion during conversion between hangul
and hanja. Read/write Boolean.
----------------------------------------