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 3632486
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:31:53+00:00 2026-05-19T00:31:53+00:00

I have a WCF Service Application project with a REST service which has it’s

  • 0

I have a WCF Service Application project with a REST service which has it’s InstanceContextMode set to Single. It contains a timer which I want to use to regularly go through and check the registrations.

The timer does not start until someone calls the service for the first time. What I want to know is, is there some kind of timeout like in ASP.NET websites after which IIS will stop the service if nobody used it for a while or will the timer continue running.

[ServiceContract]
public interface IRegistrationService
{
    [OperationContract, WebGet...]
    void Register(...);
}

[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
public class RegistrationService : IRegistrationService
{
    private Timer timer;
    public RegistrationService()
    {
        this.timer = new System.Timers.Timer(1000 * 60 * 5);
        this.timer.Elapsed += OnTimerElapsed;
        this.timer.Start();
    }

    private void OnTimerElapsed(object sender, ElapsedEventArgs e)
    {
        // 
    }
}
  • 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-19T00:31:53+00:00Added an answer on May 19, 2026 at 12:31 am

    It will continue running untill host app is up and running. If your service is hosted in IIS and Keep-Alive is disabled, it will be closed, but in case of winforms or windows service host, object will persist untill the application is closed. To close this object make the service Disposable and dispose the class when timerElapsed.

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

Sidebar

Related Questions

I have a selfhosted WCF service application which I want to deploy by a
We have an application that has a WCF service (*.svc) running on IIS7 and
I have a wcf service application that has some application startup code in the
Is it possible to create a WCF REST 4.0 service which has two endpoints
I have a WCF service application and in this app I am doing calls
I have developed a Web service using WCF Service Application. This service application is
I have a WCF service and a Silverlight application that work just fine when
I have a WCF service that is hosted in a windows application. The service
Greetings, I have a wcf service that exposes functionality to my wpf application. This
I have client application that uses WCF service to insert some data to backend

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.