Channels ▼

Joydip Kanjilal

Dr. Dobb's Bloggers

Web Deployment Enhancements in Visual Studio 2010

April 22, 2010

Microsoft's Visual Studio 2010 marks the next generation of developer tools for designing Windows and web applications. Visual Studio 2010 provides marked improvements in application packaging and deployment that improves the deployment experience to a great extent.

Visual Studio 2010 provides the following deployment enhancements:

  • Web packaging. The Web Publishing Pipeline (WPP) feature makes use of MSBuild and MSDeploy and provides support for seamless packaging and deployment of web applications. Visual Studio 2010 uses MSDeploy to create a compressed file for your application. This compressed file is commonly known as a "web package" and consists of:

    • Metadata Information
    • IIS Settings
    • Web Content
    • SQL Server Database used (if any)
    • Security Information
    • Registry Information

    Note that you can use the IIS Manager User Interface to install a web package.

  • Web.Config File Transformation. Typically, your web application goes through a chain of deployment environments. These may include: Development environment, QA/Staging environment, Production environment. While transitioning between these environments, you would often need to change the settings of the application's web.config file to suit a particular environment. Such settings may include: connection strings, debug flags, etc. Making changes to the application's web.config file to suit it for a particular hosting environment is tedious and prone to errors.

    Visual Studio 2010 lets you transform the application's web.config used at the development time to a web.config file for production/deployment using the XML Document Transform (XDT) feature. Web.Config file transformation is controlled by allowing you to have multiple copies of the application's web.config files suited for various environments, i.e., web.debug.config, web.release.config, etc and then enabling you to change the content of the web.config file to suit it for a particular environment.

  • One-Click Web Publish . ClickOnce deployment is a deployment strategy that enables you to deploy self-updating applications that can be installed and updated remotely. This is a feature that enables you to publish your web application, IIS settings, web content and other dependencies to IIS with one-click. In essence, Visual Studio 2010 lets you package and publish your web applications in one click. Visual Studio 2010 supports the following four methods of publishing content:

    • MSDeploy Publish
    • FTP
    • File System
    • Front Page Server Extensions (FPSE)

    To use Web One-Click Publish with Visual Studio 2010 you need to properly set up your application's web.config transformation to change the database connection string and then create a One-Click Publish Profile to publish your web content, database(s), and the transformed web.config files.

  • Database Deployment. You can use Visual Studio 2010 to deploy your application including all of its dependencies on SQL Server. You just need to provide the connection string for your source database -- Visual Studio 2010 would automatically create a package for deployment along with the IIS settings and web content. Once your application has been packaged successfully, you can deploy it on any server -- you just need to provide the connection string while installing the package.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.