Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running a program with no user interface
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01458707
Message ID:
01458763
Views:
37
Thanks for the info. The last time I wrote a Windows service in .NET, I couldn't get it to run unless it was installed in the Windows folder.


>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.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform