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

How can I keep an application running after logout?

zz
I wrote a .NET windows service,and change the type to Interactive Services.
In method OnStart ,I start a .NET application. But after I logout,that
application terminates unlike the behavior of Win32 app. How can I keep it
running ?
Jul 21 '05 #1
5 5084
zz
Buy the way,it's a winform application.

Jul 21 '05 #2
ZZ,

Did you try it under the system account.

Cor
Jul 21 '05 #3
On Mon, 23 May 2005 00:11:02 -0700, zz wrote:
I wrote a .NET windows service,and change the type to Interactive Services.
In method OnStart ,I start a .NET application. But after I logout,that
application terminates unlike the behavior of Win32 app. How can I keep it
running ?


Your application exits because even though you are launching it from a
Windows Service, it is still a normal Windows application that has not been
designed to run in the background without a user being logged on. Windows
Services, unlike normal Windows application, are designed specifically to
run in the background with or without a user logged on. They implement
special interfaces that normal application don't implement and that allow
Windows to let them run even when the interative user logs off.

There is a project on the code project though that seems to allow you to
launch normal applications as Windows Services. I have not tried it so i
don't know how it works and if it really works. In either case, that's a
dirty hack so use it only if you really have no other choice than that:
<http://www.codeproject.com/system/xyntservice.asp>
Jul 21 '05 #4
zz
Thank you all. I override the Form.WndProc and process the WM_QUERYENDSESSION
and WM_ENDSESSION with out calling base.WndProc. It does work.
Jul 21 '05 #5
On Tue, 24 May 2005 16:50:01 -0700, zz wrote:
Thank you all. I override the Form.WndProc and process the WM_QUERYENDSESSION
and WM_ENDSESSION with out calling base.WndProc. It does work.


Interesting. Does it mean that the Windows application keeps running even
after you've logged out? Where is it displayed then?
Jul 21 '05 #6

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

Similar topics

3
by: Jon Bosker | last post by:
I have written an application that lives in the systray but when I try to close windows or logout it does not close my application and therefore prevents windows from shutting down or logging me...
7
by: zz | last post by:
I wrote a .NET windows service,and change the type to Interactive Services. In method OnStart ,I start a .NET application. But after I logout,that application terminates unlike the behavior of...
0
by: Joseph Geretz | last post by:
My application software is deployed across two tiers; a WinForms workstation client and a Web Services layer. My application will require authentication, however I'm not keen on building my own...
4
by: Simon Verona | last post by:
I'm looking to build a "kiosk" style of application in vb.net (using winforms)... Writing the application itself is no problem. What I want to do though is have the PC set so that the...
0
by: YVT1968 | last post by:
Hi, Here is the problem statement. I have an asp.net application, let's call it "A". From this application, I open 3 more applications, let's call them, A1, A2, A3. Now, in the default page on A, I...
6
by: =?Utf-8?B?U3RlcGhlbiBIYXRmaWVsZA==?= | last post by:
I have two masterpages in a web application. One is used for the login and logout pages. The other is used for all other pages in the application. The difference between the two masterpages is...
1
by: Smita Kashyap | last post by:
Hello Great Developers I am working in Asp.net 2.0. I want to know how to identify that our web application is close so that cookies get expire.Actually I want to expire cookies whenever web...
7
by: mail747097 | last post by:
I would like to keep IIS alive on my web site and prevent Application_End from occuring in global.asax. Any ideas?
10
by: chaos | last post by:
How to do logout alert message when i press on the logout image <a href="../logout.php" target="_top" onClick="return logout()"...
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: 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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.