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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:24:41+00:00 2026-05-25T22:24:41+00:00

Let me explain the scenario first. I have installed multiple copies (Say 10) of

  • 0

Let me explain the scenario first.

I have installed multiple copies (Say 10) of Services from a single install base. Now I want to update one of the dll. I need to Stop all the services, update the dll and restart the Service again.

To avoid the situation, I used ShadowCopying in code. So that the dlls can be updated without stopping all the services. It is as follows.

static void Main(string[] args)
{
    AppDomain.CurrentDomain.SetCachePath(@"C:\Cache");
    AppDomain.CurrentDomain.SetShadowCopyPath(AppDomain.CurrentDomain.BaseDirectory);
    AppDomain.CurrentDomain.SetShadowCopyFiles();

    ServiceBase[] ServicesToRun;
    ServicesToRun = new ServiceBase[] 
        { 
            new SampleService(serviceName) 
        };
    ServiceBase.Run(ServicesToRun);
}

Now I am trying to achieve the same via app.config file, as follows, from Asp.Net

<hostingEnvironment 
    idleTimeout="Infinite" 
    shutdownTimeout="30" 
    shadowCopyBinAssemblies="true" />

Any suggestions?

  • 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-25T22:24:42+00:00Added an answer on May 25, 2026 at 10:24 pm

    The ASP.Net hosting environment has built-in support for managing application recycling.

    Windows .Net services use the standard CLR host which does not have this support. You would have to implement your own e.g.

    1. Create a child AppDomain to host your service code, and configure shadow copying.
    2. Use something like a FileSystemWatcher to monitor the original bin directory.
    3. When files change, tear down your AppDomain and create a new one and reload.

    The ASP.Net host does something along these lines (but also has the ability to manage existing requests, queue new requests whilst this is going on, etc).

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

Sidebar

Related Questions

Let me explain my scenario first: I have around 2000 tests to run, which
I'm using Subclipse 1.6x plugin in Eclipse. Let me explain the scenario first: Say
let me explain my current situation i have a SharePoint site lets say it
First let me explain how I currently handle validation, say, for an IPv4 address:
I need a help. Let me first explain the scenario with a small sample.
First let me explain you what I mean by a nested transaction. Example: say
I got stuck with this scenario. Let me explain as follows. I have a
Ok, let me explain the scenario. I have a orders table with a auto
Alright let me explain my situation first: I am part of an organization that
Quite new to maven here so let me explain first what I am trying

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.