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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:25:37+00:00 2026-05-19T17:25:37+00:00

I am new to MSDeploy as well as IIS admin. In order to show

  • 0

I am new to MSDeploy as well as IIS admin.

In order to show a “site under maintenance” page we are looking at two alternatives.

1) Have an app_Offline.htm page and sync it to the server when maintenance starts.

2) Create a separate folder with a totally different site (which can show a lot more dynamic information than what we can with the app_offline page). During maintenance, it is being suggested that we change the virtual folder mapping of the site to point to this other folder while we work on updating the site.

Is there a way to change the virtual folder to point to another folder using MSDeploy? Is there any other way to do this via a script rather than having to go to each server and manually change the folder ?

  • 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-19T17:25:38+00:00Added an answer on May 19, 2026 at 5:25 pm

    Set app_offline using MSDeploy

    What we’ve done in the past is to script our deployments using Msdeploy.exe. We execute 3 commands.

    1. The first command deploys the app_offline.htm page.

      msdeploy -verb:sync -source:filePath=c:\location\app_Offline.htm -dest:filePath=c:\site\app_Offline.htm

    2. Second we actually deploy the site using that same “sync” verb but using a package.

    3. Third we’ll remove the app_offline.htm using MSdeploy.

      msdeploy -verb:delete -dest:filePath=c:\site\app_Offline.htm

    You can execute msdeploy across multiple servers using the “computername” destination switch. Like:

    msdeploy -verb:sync -source:filePath=c:\location\app_Offline.htm,computername=sourcemachine  -dest:filePath=c:\site\app_Offline.htm,computername=destmachine  
    

    You can find more information about all the different parameters for using msdeploy via command line here: http://technet.microsoft.com/en-us/library/dd568991%28WS.10%29.aspx

    Creating a virtual directory using MSDeploy

    If you still want to create the virtual directory what I’d suggest is creating a powershell script on each destination sever that would do this for each server. Your powershell script would have something like this in it:

    New-Item ‘IIS:\Sites\Default Web Site\VirtualDirName’ -type VirtualDirectory -physicalPath c:\test\virtualDirectory1

    You can find more info about using powershell for this here:
    http://learn.iis.net/page.aspx/433/powershell-snap-in-creating-web-sites-web-applications-virtual-directories-and-application-pools/

    Then execute using msdeploy utalizing the “runcommand” provider. You would execute this line per server.

    msdeploy -verb:sync -source:runCommand="net start createvirtualdir.ps" -dest:computername=destmachine
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking into TFS2010 new build and deployment features with MSDeploy. So far
new to java and brand new to the site. I have a JLabel added
I've just been reading about MSDeploy, the new website deployment tool from Microsoft. I'm
New to PHP and MySQL, have heard amazing things about this website from Leo
New to Node.js and Express, I am trying to understand the two seems overlapping
New-style status messages (as in mobile apps and web interface) have new properties e.g.
New to xml. Looking for XPath to search a xml file with python ElementTree
New to DDD here and have a architecture question which should be a typical
New to SO and javascript. I have been playing with JQuery for a couple
New to Objective-C and iOS development, would love a hand here! I have written

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.