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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:39:49+00:00 2026-06-10T05:39:49+00:00

I’m working on a worker role failover solution and I need to be able

  • 0

I’m working on a worker role failover solution and I need to be able to test and debug the failover mechanism by shutting down or restarting instances as well as creating new ones.

How do I restart or shutdown specific instances on the local Azure Emulator? I’m using the 1.7 SDK

Thanks,

  • 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-06-10T05:39:51+00:00Added an answer on June 10, 2026 at 5:39 am

    I have to disagree with David’s answer here. There are a few things you can do to shut down instances or create new instances.

    Shutting down / Killing instances

    When you run your application in the emulator it starts 1 Web Role (WaIISHost.exe) / Worker Role (WaWorkerHost.exe) process per instance:

    enter image description here

    When you kill one of these processes it’s as if you killed an instance. After switching back to the emulator you’ll see that the icon of that specific instance you killed changed color and the logs will show that the state of the instance is Unknown/Destroyed:

    enter image description here

    When the debugger is attached you’ll see this happen and the instance will never restart, allowing you to test scenarios where you suddenly loose one or more instances. If the debugger is not attached this will all happen very fast and the instance will restart right away (in Visual Studio you can choose to start without debugging).

    Increasing or decreasing the number of instances

    Using csrun.exe (usually located in C:\Program Files\Microsoft SDKs\Windows Azure\Emulator) you can update the configuration of your service in the emulator, including the number of instances. Let’s say I want to add 6 instances to the 4 instances I have at the moment.

    I open the ServiceConfiguration.cscfg file located in my Debug folder of your Azure project (..\Some\Path\MultipleInstancesDemo\MultipleInstancesDemo\bin\Debug) and change the number of instances to 10:

    <ServiceConfiguration serviceName="MultipleInstancesDemo" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7">
      <Role name="MyWebRole">
        <Instances count="10" />
        <ConfigurationSettings>
          <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
        </ConfigurationSettings>
      </Role>
    </ServiceConfiguration>
    

    Then it’s possible to push this to the emulator by providing csrun.exe with the deployment ID and the path to the configuration file. You’ll find the deployment ID in the emulator. In the previous screenshot you’ll see deployment17(20), this means that the deployment ID is 20. This is how you would call csrun.exe:
    csrun /update:20;”..\Some\Path\MultipleInstancesDemo\MultipleInstancesDemo\bin\Debug\SeviceConfiguration.cscfg”

    After a few seconds you’ll see the new instances in the emulator:

    enter image description here

    Note!: Also here it seems that this only works when you start the project without debugging.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.