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

  • Home
  • SEARCH
  • 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 440015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:49:49+00:00 2026-05-12T20:49:49+00:00

I have a WCF Service that I have written, which is hosted within a

  • 0

I have a WCF Service that I have written, which is hosted within a Windows service. It is operating in PerSession mode. The service permits clients to open files, make changes to files and close files remotely through the service. So far all works very smoothly.

When the Windows service is stopped, I would like to be able have the WCF Service not accept any new sessions and yet allow already connected clients to complete their current sessions and work (within a reasonable period/timeout).

What would be the best way to accomplish this?

  • 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-12T20:49:50+00:00Added an answer on May 12, 2026 at 8:49 pm

    Basically, calling ServiceHost.Close() will accomplish this – it will let all currently running request run to completion, but new request are being rejected will the orderly shutdown is in progress.

    There’s a “CloseTimeout” setting on your binding that you configured for your service – that controls how long the WCF runtime will allow running requests to take until they’ve properly shut down. If that timeout happens, the still running requests will be killed.

    The ServiceHost.Abort() method on the other hand is the digital equivalent of a sledgehammer – all running requests are terminated at once, and the host is shut down.

    ON the client side, you have the same .Close() and .Abort() methods on your client proxy which behave the same way.

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

Sidebar

Related Questions

I have a WCF service that is hosted in a windows application. The service
Hi All I have written a wcf service and hosted it on windows service.
I have a WCF service that I call from a windows service. The WCF
Here is my situation. I have written a WCF service which calls into one
I have written a WCF service (I am a newb) that I want to
I have written a very simple WCF service, that worked fine (code below), then
I have a WCF service that I have to reference from a .net 2.0
I have a WCF Service that should not enter the faulted state. If there's
I have a WCF Service that exposes a method GetCustomers(). The internals of the
I have a WCF service that uses basicHttpbinding in development. Now in product we

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.