 |
| General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category.
** PLEASE BE SPECIFIC WITH YOUR QUESTION **
When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 2nd, 2005, 06:12 AM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Windows C# application that survives logoffs
How do I create a C# Windows application that survives logoffs (windows xp/nt) and that if opened in some user and the user logs off and another user logs in - the same instance of the application will be alive all this time.
Meaning that while the windows is opened and the application is opened, it will not be closed by an indirect action.
Any help would be appreciated.
|
|

October 2nd, 2005, 07:11 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
This sounds like a good job for a Windows Service that you can create with Visual Studio .NET relatively easy.
Search this: http://www.google.com/search?hl=en&q...ervice%22+.NET for articles about creating windows services.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

October 9th, 2005, 05:11 AM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Unfortunately, I cannot use this application as a Windows Service.
However, I tried making it a scheduled task but when I uncheck "Run only if logged on" and set a valid password, it gives me an error: 0X80070005 Access is denied. You do not have persmission to perform the requested operation.
How can I run this as a scheduled task?
|
|

October 9th, 2005, 05:13 AM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Unfortunately, I cannot use this application as a Windows Service.
However, I tried making it a scheduled task but when I uncheck "Run only if logged on" and set a valid password, it gives me an error: 0X80070005 Access is denied. You do not have permission to perform the requested operation.
How can I run this as a scheduled task?
|
|

October 9th, 2005, 01:01 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
When do you get this error?
is your application trying to access network resources?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

October 11th, 2005, 06:57 AM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I set a scheduled task (in windows control panel) to execute the exe file of my application. And I try to set in the properties uncheck to "Run only if logged on", and then when I click on "apply" it gives me the mentioned error, meaning, before I can even run it.
|
|

October 11th, 2005, 02:39 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Marla,
Could this be a permissions issue? What account are you using? Maybe, although I am not sure, the account you schedule the task for needs permissions like "logon as a batch job"....
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

October 16th, 2005, 02:55 AM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
No, the account is administrator.
Thanks anyways.. I'm kinda lost here :)
Quote:
quote:Originally posted by Imar
Hi Marla,
Could this be a permissions issue? What account are you using? Maybe, although I am not sure, the account you schedule the task for needs permissions like "logon as a batch job"....
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
|
 |