Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 654993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:33:17+00:00 2026-05-13T22:33:17+00:00

I need to create a service in .NET that maintains (inner) state in-memory, spawns

  • 0

I need to create a service in .NET that maintains (inner) state in-memory, spawns multiple threads and is generally long-running. There are a lot options –

  • Good-old Windows Service
  • Windows Communication Services
  • Windows Workflow Foundation

I really don’t know which to choose. Most of the functionality is in a library used by this service, so the service itself is rather simple.

On one hand, it’s important the service host is as close to “simply working” as possible, which excludes Windows Service. On the other hand, it’s important that the service is not taken down by the host just because there’s no external activity, which makes WCF kind o’ “scary”. As for WF, it’s strongest selling point is the ability to create processes as, um…, workflows, which is something I don’t need nor want.

To sum it up, the plethora of Microsoft technologies got me a bit confused.

I’d appreciate help regarding the pros and cons of each solution (or other’s I’ve failed to mention) for the problem of a stateful, long running service in .NET

Thanks,
Asaf

P.S.,
I’m using .NET 4.

EDIT:

  • What I mean by the host “simply working” is, for example, that the service I create be reactivated if it crashes.
  • I guess the reason for this question is that I’ve created Windows Services in the past (I think it was in plain C++ with Win32 API), and I don’t want to miss out on something simpler if there’s is such as thing.

Thanks for all the replies thus far!
Asaf.

EDIT 2:

I’ll use a Windows Service, and might host a WCF service inside it to allow other processes to communicate with it.

Thanks,
Asaf

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:33:17+00:00Added an answer on May 13, 2026 at 10:33 pm

    Based on your description, your best bet is #1, a Good Old Windows Service. You can assign work to it, it can run as long as you want, and it can spawn threads. Not sure what you mean by “simply working,” or why that puts a Windows Service out of the running.

    You could, alternatively, make a simple console app, but you’d have to handle the management (restarts, etc) yourself.

    WCF is essentially .NET remoting over the web, it doesn’t handle long-running processes by itself. Workflow Foundation can handle long-running workflows, but only that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anybody knows how to do this? I need to create a service that will
I need to create a photo gallery service that is managed by users. I've
I have a need to create multiple processing threads in a new application. Each
I need to create some windows service which will execute every N period of
I need to create an XML schema that looks something like this: <xs:element name=wrapperElement>
I need to create a repeatable process for deploying SQL Server Reporting Services reports.
I have several web services I need to create for them some testing mechanism
I work a lot with external Web Services, and I need to create an
I have created an web service I need to publish this service. I need
I need to create a historical timeline starting from 1600's to the present day.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.