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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:04:35+00:00 2026-05-29T09:04:35+00:00

We have WebRole, that hosting multiple sites. We made startup tasks for each site

  • 0

We have WebRole, that hosting multiple sites. We made startup tasks for each site with some site specific actions. The problem is that only startup task of first site (first site listed in section), could be run during deployment.

Looks like this happens cause only first site (or that one from web-role defifnition) will be copied to [drive]:\approot folder at WebRole Instance. All other sites will be copied to [drive]:\sites\ (early it was another location so it could be a subject of future changes).

Is there any simple way to run batch files for each site in [drive]:\sites\ ?

Is there any tricks with RoleEnvironment object or xPath values (like here http://msdn.microsoft.com/en-us/library/windowsazure/hh404006.aspx) that can provide exact path where additional sites will be placed ?

ATM we have 2 options, both are hacky and unstable, imo:
1.Read data from IIS configuration and use it as main startup task input
2.Scan /sites/ for explicitly named scripts and execute it if found.

  • 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-29T09:04:36+00:00Added an answer on May 29, 2026 at 9:04 am

    Startup Task is meant to be for a Role and not for a site. You have to find your way out using the RoleEntryPoint descendant and utilize its OnStart method to manually run your startup tasks per site.

    As for finding out the sites directories check out this question, as the answer completly covers the task. I use it, it is 100% reliable for production.

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

Sidebar

Related Questions

We have a Web Role that we are hosting in Windows Azure that uses
I have webRole with some data stored in Session. The data is some tens
Have a photography site that I want to prevent image copying from. How can
I have a problem deploying a WebRole (WCF service) to Azure . My WebRole
Lets say I have a Silverlight application that currently talks to a WebRole in
I have a class library that is shared between multiple Role projects in my
Have just started using Google Chrome , and noticed in parts of our site,
I have stored some files in the form of blobs on azure and I
Problem I would like to trace the Uri that will be generated by a
I have a WCF application hosted as a webrole in Azure with the following

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.