Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a program with no user interface
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01458707
Message ID:
01458759
Vues:
49
>Bonnie's suggestion has issues. If you want it to run scheduled, then a service is not the way to go. Also, services add complexity themselves as they must be installed in the Windows folder and by default run under the System account, so added rights may be required to access data.
>

I've had good luck with writing services and haven't really found them to be any more problematic than a desktop app as long as you understand that you WILL run into permission issues if you run it under the default accounts. They can be installed in any directory (uderstanding the security issues). I normally just create an account for the service, give it the proper permissions, then run the service under that account instead of Local System. For scheduled stuff I create a timer and fire it at some interval. If it's time based (instead of interval based) I just compare the current time to the last run time and determine if I need to run it again.

If you need a UI then the desktop app works well. But you could also just host something like WCF in your service and write a desktop app that interfaced to the service through it. Depends on the needs, though.

I've found the main benefit of the service being that it automatically starts up, isn't tied to anyone logging in, and as long as you trap for ALL exceptions they can be pretty robust.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform