can application service start without being logged in?
-
does anyone know if i can create a .net application as a service which would still be started even if the user restart and doesn't log in?
That's kind of the definition of a Windows Service application. They run when Windows starts, not when a user logs in. If you were thinking that you were going to write a service application that puts up a user interface the user can see, forget it. That's not allowed for security reasons. If you wanted to do something like that, you'd be writing TWO applications. One would be the service that is constantly running and the other would be a normal application that runs when the user logs in and communicates with the service over an IPC method of your choice.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
That's kind of the definition of a Windows Service application. They run when Windows starts, not when a user logs in. If you were thinking that you were going to write a service application that puts up a user interface the user can see, forget it. That's not allowed for security reasons. If you wanted to do something like that, you'd be writing TWO applications. One would be the service that is constantly running and the other would be a normal application that runs when the user logs in and communicates with the service over an IPC method of your choice.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
ah ic, thanks you very much. i am probably gonna create two application. though i never used an IPC method before.
neodeaths wrote:
i never used an IPC method before.
IPC Stands for "InterProcess Communication". Read this[^]. I would suggest using Named Pipes.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
does anyone know if i can create a .net application as a service which would still be started even if the user restart and doesn't log in?
All services start before login so the service should start even if the user does not login.
WP Apps - Color Search | Arctic | XKCD | Sound Meter | Speed Dial
-
does anyone know if i can create a .net application as a service which would still be started even if the user restart and doesn't log in?
-
does anyone know if i can create a .net application as a service which would still be started even if the user restart and doesn't log in?
A windows system service starts as soon as Windows is started - Remember that a service may not be able to access user-specific folders and files when the respective user is not logged in! - MB
cheers Marco Bertschi
You have absolutely no idea how glad I am that I have no idea at all. - OriginalGriff I'm at peace with the world and myself. - Me
-
A windows system service starts as soon as Windows is started - Remember that a service may not be able to access user-specific folders and files when the respective user is not logged in! - MB
cheers Marco Bertschi
You have absolutely no idea how glad I am that I have no idea at all. - OriginalGriff I'm at peace with the world and myself. - Me
-
if i need to save a little bit of application data. what can i use besides database and still be sure that i will have access to it?. should i use registry? or save the data in an flat file in the program files?
You can't save anything to program files or below. It's readonly to normaly users. You can get the path to an appropriate place to put your data from this list[^]. Use Environment.GetFolderPath[^] to get that path, then combine it with your data filename using Path.Combine[^].
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
You can't save anything to program files or below. It's readonly to normaly users. You can get the path to an appropriate place to put your data from this list[^]. Use Environment.GetFolderPath[^] to get that path, then combine it with your data filename using Path.Combine[^].
A guide to posting questions on CodeProject[^]
Dave Kreskowiak