App_Offline Updates in Webdeploy V3 and Visual Studio 2013

IIS

App_Offline Updates in Webdeploy V3 and Visual Studio 2013

Please refer Don’t Mess with App_Offline article to see the usefulness of App_Offline. Treat the below article as an update to the concepts and basics shared earlier.

After going through visual studio 2013 updates available across the web, I found some interesting notes related to app_offline at

  1. http://www.iis.net/learn/publish/deploying-application-packages/taking-an-application-offline-before-publishing
  2. http://blogs.msdn.com/b/webdev/archive/2013/10/30/web-publishing-updates-for-app-offline-and-usechecksum.aspx

To summarize both the articles, An “AppOffline” rule was added to Web Deploy V3, This rule is disabled by default and needs to be enabled for taking an application offline.

Example to be run on command line:


msdeploy.exe -verb:sync -source:iisApp=mySite -dest:auto,computername= -enableRule:AppOffline

Now, the above logic is integrated with visual studio 2013 where the rule can be enabled  in .pubxml file associated to corresponding publish profile.These web publish profiles are stored as MSBuild files under Properties\PublishProfiles

Add the following element in the PropertyGroup element.


<EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>

So the resulting publish profile will look something like the following.


<!--?<span class="hiddenSpellError" pre=""-->xml version="1.0" encoding="utf-8"?&gt;

&lt;Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;

&lt;PropertyGroup&gt;

&lt;EnableMSDeployAppOffline&gt;true&lt;/EnableMSDeployAppOffline&gt;

&lt;WebPublishMethod&gt;MSDeploy&lt;/WebPublishMethod&gt;

&lt;MSDeployServiceURL&gt;(removed)&lt;/MSDeployServiceURL&gt;

&lt;DeployIisAppPath&gt;Default Web Site&lt;/DeployIisAppPath&gt;

&lt;AllowUntrustedCertificate&gt;True&lt;/AllowUntrustedCertificate&gt;

&lt;SkipExtraFilesOnServer&gt;True&lt;/SkipExtraFilesOnServer&gt;

&lt;DeployAsIisApp&gt;False&lt;/DeployAsIisApp&gt;

&lt;MSDeployPublishMethod&gt;WMSVC&lt;/MSDeployPublishMethod&gt;

&lt;UserName&gt;sayedha&lt;/UserName&gt;

&lt;ExcludeApp_Data&gt;False&lt;/ExcludeApp_Data&gt;

&lt;_SavePWD&gt;True&lt;/_SavePWD&gt;

&lt;/PropertyGroup&gt;

&lt;/Project&gt;

Thanks!

Author: hershey

A passion for knowledge drives me to do programming, A passion for programming drives me to create something different, A passion for creation drives me to spread the knowledge.

Share This Post On

0 Comments

  1. nice superb explaination

    Post a Reply
  2. thanks for the tutorial
    I am having a problem.
    The feature “Create SQL server database” isn’t available , I can’t select it.
    Can you help, please ?

    Post a Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

More from CodeSpread:

  • How to add alias and create virtual directory?How to add alias and create virtual directory?There is a term very famous in IIS world 'virtual directory', but before discussing a virtual directory, we should be familiar with the term 'alias'.By definition, an object can have alternative na...
  • IIS- Still learning!IIS- Still learning!Whenever we receive some error which is related to IIS, we just jump on internet as we lack the basic concepts of IIS and i can definitely say that we almost ignore IIS and focus ourselves on devel...
  • IIRF.ini for URL rewritingIIRF.ini for URL rewritingWe often hear the terms like URL rewriting or friendly URLs. There are many techniques available to achieve it and we will discuss one of those today, IIRF. What is URL rewriting? Before we try t...
  • IIS Pre-ArticleIIS Pre-ArticleI thought of sharing few articles on IIS so when I started my mission, I realized that there should be some basic tasks related to IIS which needs to be done by the user before diving deep into IIS...
  • ASP.NET and Web Tools 2013.1 for Visual Studio 2012ASP.NET and Web Tools 2013.1 for Visual Studio 2012.NET Web Development and Tools group at Microsoft announces release of ASP.NET and Web Tools 2013.1 for Visual Studio 2012. Few of the features are: 1) Round tripping: With this update, developer...
  • 23 Dec: Must Read Codes [11-15]23 Dec: Must Read Codes [11-15]We are sharing few must read codes/concepts which are required now and then. Each of these codereads doesn’t require a full length descriptive article so combining them into groups of five. CodeRe...
  • Creation of DemoSpaceCreation of DemoSpaceThe Backend URL shown in the article : NetBiscuits: How fascinating can it be to create a mobile website? is the Demospace server location where the Published files of the applications will be plac...
  • Sunday Splash: IT NewsSunday Splash: IT NewsAre we ready for this? Of course we are!! This is repeated every year. :) Enjoy!!