473,789 Members | 2,530 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5153
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_QUERYENDSESS ION
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_QUERYENDSESS ION
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
5497
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 out. It is essential that I solve this problem but I have run out of ideas can anyone help (please!) The application starts in Start.cs which kicks off the Systray form using this call: Application.Run(new Systray());
7
650
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 Win32 app. How can I keep it running ?
0
885
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 authentication services into the application. Rather, I'd like to leverage Windows domain security. I can think of three scenarios: 1. The user is logged in to the domain. In this case, I'm assuming that the user's credentials will be used...
4
10382
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 application runs automatically on system startup - is completely modal - no alt-tab's allowed. I don't want to have the start button or even want the "explorer" item running at all. I want my application to be the only thing running.
0
1289
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 have a logout button. On clicking of this logout button, I want to clear session for A1, A2 and A3. The three applications have three different sessions. This is apparent from the fact that, a session variable set in one application cannot be...
6
1983
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 that on the main one I have a user control in the left side that has the site navigation menu while the login/logout masterpage has a non-breaking space in that table cell. Everything else is exactly the same. The issue is that the login/logout...
1
1389
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 application browser is closed without logout. When user manually logout then it is easy to expire cookies. But if he/she just close the web browser then how cookies will expire. I think i repeat same line. One more think I want to know how to...
7
7227
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
4075
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()" "MM_nbGroup('down','group1','logout','',1)""MM_nbGroup('down','group1','logout','../button_images/logout_button_down.png',1)" onMouseOver="MM_nbGroup('over','logout','../button_images/logout_button_down.png','../button_images/logout_button_down.png',1)" onMouseOut="MM_nbGroup('out')" ><img name="logout"...
0
9506
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10193
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10136
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6761
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4089
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.