Re: running app as a service - logoff user shuts down application

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi

Yes my app does interact with the desktop, and the appropriate check box is
checked in the service properties window.

The research I have done to date seems to indicate my app needs to handle
the CTRL_LOGOFF_EVENT
but I can't seem to find anything inteligable to says how to go about this
espicially in visual basic .net





"Dmytro Lapshyn [MVP]" <x-code@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ePYuBIMIGHA.1192@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Rob,
>
> Does your app interact with the desktop? I just have a guess that since
> there might be no window station available after the user logging off,
> srvany might have to shut down your application if it is designed to
> interact with the user (which services should mostly never do).
>
> I might also suppose this is a srvany bug, but I have absolutely nothing
> to prove this - so what you might do is to search for a list of srvany's
> known issues.
>
> "Rob Latour" <roblatour@xxxxxxxxxx> wrote in message
> news:eVNUJlJIGHA.596@xxxxxxxxxxxxxxxxxxxxxxx
>> I've set up an application to run as a service using srvany
>>
>> the application starts fine as a service when my pc is powered up
>>
>> everything stays fine when a user logs on
>>
>> however when a user logs off (with out shuting down) the application ends
>>
>> is there an event or something I can work with to prevent my application
>> (written in vb.net using vs 2005)
>> from ending when the user logs off
>>
>> thanks in advance
>>
>> Rob
>>
>
>


.


Quantcast