ASP.NET Web Deployment - Recommended Resources
This topic provides links to documentation resources about how to deploy (publish) ASP.NET web applications to IIS by using Visual Studio 2010, Visual Web Developer 2010, and later versions.
If you know a great blog post, stackoverflow thread, or any other link that would be useful, send us an email with the link.
[!NOTE]
Many of these resources describe deployment features that are available only if you install a recent release of the Visual Studio Web Publish Update. Some of the features are available only in Visual Studio 2012 or Visual Studio 2013.
This topic contains the following sections:
- Understanding deployment options for web projects
- Finding hosting providers for an ASP.NET application
- Deploying a web application from Visual Studio
- Deploying a web application by creating and installing a web deployment package
- Deploying a web application using a continuous integration (CI) process
- Using Web.config transformations to change settings in the destination Web.config file or app.config file during deployment
- Using Web Deploy parameters to change settings in the destination web application during deployment
- Making sure an application is off-line during deployment
- Deploying a database or changes to a database as part of web application deployment
- Deploying a database separately from web application deployment
- Deploying a web application that uses ASP.NET application services such as membership and profiling
- Precompiling for deployment
- Deploying an intranet web application
- Automating common deployment tasks that are not automated out of the box
- Configuring web servers so that developers can deploy web applications to them using Web Deploy
- Configuring servers for a hosting provider
- Troubleshooting deployment problems
- Getting help with a specific deployment question
- Additional Resources
Understanding deployment options for web projects
- Web Deployment Overview for Visual Studio and ASP.NET (MSDN).
- How to Deploy a Windows Azure Web Site. Explains options and links to resources for deploying web projects to Windows Azure Web Sites, including continuous delivery (automated from source control) as well as using Visual Studio.
- Visual Studio 2012 Web Publishing Improvements (Video by Scott Hanselman).
- Overview Post for Web Deployment in VS 2010 (Vishal Joshi’s blog). An older blog post but some of the Visual Studio 2010 resources it links to have information that is still relevant for Visual Studio 2012.
Finding hosting providers for an ASP.NET application
Deploying a web application from Visual Studio
- How to Deploy a Windows Azure Web Site. Explains options and provides links to resources for deploying web projects to Windows Azure Web Sites. Includes a section about deploying from Visual Studio.
- ASP.NET Web Deployment using Visual Studio. 12-part tutorial series, shows how to deploy web applications with SQL Server databases. For database deployment uses both the dbDacFx provider and Entity Framework Code First Migrations. Also includes information about Web.config file transformations, deploying individual files, command-line deployment, and how to customize the Visual Studio web publish pipeline by editing .pubxml files. Applies to all ASP.NET web projects, including Web Forms, MVC, and Web API.)
- How to: Deploy a Web Project Using One-Click Publish in Visual Studio (Reference information for the Visual Studio Web Publish wizard.)
- Deploying an ASP.NET Web Application with SQL Server Compact using Visual Studio. This is an earlier version of ASP.NET Web Deployment using Visual Studio listed at the top of this section. Mainly useful now for information about how to deploy SQL Server Compact databases and how to migrate from SQL Server Compact to a full edition of SQL Server.
- .NET Multi-Tier Application Using Storage Tables, Queues, and Blobs (Microsoft Azure site). 5-part tutorial series, shows how to create an MVC project and deploy it to a Windows Azure Cloud Service.
## Deploying a web application by creating and installing a web deployment package
- How to: Create a Web Deployment Package in Visual Studio (MSDN).
- How to: Install a Deployment Package Using the deploy.cmd File Created by Visual Studio (MSDN).
- Using a Web Deploy package to deploy to IIS on the dev box and to a third party host (Sayed Hashimi’s blog). How to use IIS Manager to install a deployment package in IIS on the local computer and at a hosting company that supports IIS Manager for Remote Administration.
- Building a Web Deploy Package From Visual Studio 2010 (IIS.NET web site). Includes instructions for command-line package creation and installation.
- Package Once Publish Anywhere (Sayed Hashimi’s blog). Introduces a NuGet package that automates the process of transforming the Web.config file for multiple destination environments, so that you can deploy one package to multiple servers. See also the PackageWeb video by Sayed Hashimi.
See also the following section.
Deploying a web application using a continuous integration (CI) process
- Continuous Integration and Continuous Delivery (Building Real-World Cloud Apps with Windows Azure). E-book chapter that introduces continuous integration and continuous delivery.
- How to Deploy a Windows Azure Web Site. Explains options and links to resources for deploying web projects to Windows Azure Web Sites. Includes a section about automating deployment from source control.
- Deploying Web Applications in Enterprise Scenarios. 40-part tutorial series, shows how to automate deployment in a CI process using Visual Studio 2010 and Team Foundation Server 2010.
- Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build, by Sayed Hashimi and William Bartholomew. This is a book, not a web resource, but it is an essential guide for learning how to configure MSBuild for continuous integration scenarios.
- MSBuild Extension Pack. Includes deployment tasks.
- Team Foundation Build Customization Guide. Documentation by ALM Rangers on setting up Team Foundation Server covers web deployment and includes tutorials and videos.
- SlowCheetah XML transforms from a CI server (Sayed Hashimi’s blog). Explains how to use SlowCheetah, A Visual Studio add-in for transforming app.config and other XML files.
See also Making sure an application is off-line during deployment later in this page.
Using Web.config transformations to change settings in the destination Web.config file or app.config file during deployment
- Web.config File Transformations.
- Web.config Transformation Syntax for Web Project Deployment Using Visual Studio (MSDN).
- Web Tools 2012.2 - web.config transforms (YouTube video by Sayed Hashimi). Shows how to set up and preview Web.config transforms.
- How do I disable Web.config transformation? (MSDN).
- When should I use Web Deploy parameters instead of Web.config transformations? (MSDN).
- XDT (XML Document Transform) released on codeplex.com (.NET Web Development and Tools blog). Announces availability of the source code for the Web.config file transformation engine and lists some tools that use it.
- Windows Azure Web Sites: How Application Strings and Connection Strings Work (Microsoft Azure blog). An alternative to Web.config transforms if your destination environment is Windows Azure Web Sites and you want to transform
appSettings
orconnectionStrings
.
Using Web Deploy parameters to change settings in the destination web application during deployment
- How to: Use Web Deploy Parameters in a Web Deployment Package (MSDN).
- MSDeploy: How to update app settings on publish based on the publish profile (Sayed Hashimi’s blog). Shows how to integrate Web deploy parameters into Visual Studio publish profiles.
- Web Deploy Parameterization (IIS.NET web site).
- Web Deploy Parameterization in Action (Vishal Joshi’s blog).
- Web Deploy Parameterization vs. Web.config Transformation (Vishal Joshi’s blog).
- Windows Azure Web Sites: How Application Strings and Connection Strings Work (Microsoft Azure blog). An alternative to Web deploy parameters if your destination environment is Windows Azure Web Sites and you want to parameterize
appSettings
orconnectionStrings
.
Making sure an application is off-line during deployment
- ASP.NET Web Deployment using Visual Studio: Deploying a Code Update. See the section Take the application offline during deployment.
- Taking an Application Offline before Publishing (IIS.net site). Explains a feature built into Web Deploy 3.0 that automates handling of an app_offline.htm file. This feature does not work with custom app_offline.htm files.
- How to take your web app offline during publishing (Sayed Hashimi’s blog). How to automate the process of using a custom app_offline.htm file.
- Web publishing updates for app offline and usechecksum (Microsoft Web Development blog). Another option for automating use of app_offline.htm file.
- Web Deploy 3.5 RTW (IIS.net site). New feature in Web Deploy 3.5 for custom app_offline.htm files.
Deploying a database or changes to a database as part of web application deployment
- Configuring Database Deployment in Visual Studio (MSDN). Overview of options for deploying a database with a web project.
- ASP.NET Web Deployment using Visual Studio. 12-part tutorial series, shows database deployment by using dbDacFx provider and Entity Framework Code First Migrations.
- How to: Deploy a Web Project Using One-Click Publish in Visual Studio (MSDN).
- Deploy a Secure ASP.NET MVC 5 app with Membership, OAuth, and SQL Database to a Windows Azure Web Site. A long tutorial that builds and deploys an application that uses a single SQL Server database both for membership and application data.
- Deploying an ASP.NET Web Application with SQL Server Compact using Visual Studio. 12-part tutorial series, shows how to deploy SQL Server Compact databases and how to migrate from SQL Server Compact to a full edition of SQL Server.
See also Deploying a web application by creating and installing a web deployment package and Deploying a web application using a continuous integration (CI) process earlier in this page.
Deploying a database separately from web application deployment
- SQL Server Data Tools (MSDN).
- Including Data in a SQL Server Database Project (SQL Server Data Tools team blog). How to deploy both schema and data when deploying a database.
- How to Deploy a Database to Windows Azure (Microsoft Azure site)
- Migrating Databases to Windows Azure SQL Database (formerly SQL Azure) (MSDN).
- Migrating a Database to SQL Azure using SSDT (SQL Server Data Tools team blog).
- Migrating Data-Centric Applications to Windows Azure (MSDN).
- Migrating SQL Server Databases to Windows Azure SQL Database (MSDN).
Deploying a web application that uses ASP.NET application services such as membership and profiling
- Deploy a Secure ASP.NET MVC 5 app with Membership, OAuth, and SQL Database to a Windows Azure Web Site. A long tutorial that builds and deploys an application that uses a single SQL Server database both for membership and application data.
- ASP.NET Identity. Resources for ASP.NET Identity.
- ASP.NET Web Deployment using Visual Studio. 12-part tutorial series, shows how to deploy an ASP.NET membership database.
- Configuring a Website that Uses Application Services. For web site projects but is also relevant for web application projects.
- Users and Roles On The Production Website. For web site projects but is also relevant for web application projects.
Precompiling for deployment
- ASP.NET Web Application Project Precompilation Overview (MSDN).
- Package/Publish Web Tab, Project Properties (MSDN).
- Advanced Precompile Settings Dialog Box (MSDN).
Deploying an intranet web application
- Use the On-Premises Organizational Authentication Option (ADFS) With ASP.NET in Visual Studio 2013 (Blog by Vittorio Bertocci.).
- How to Create an Intranet Site Using ASP.NET MVC (MSDN). Older walkthrough writen for Visual Studio 2010, does not reflect major changes in intranet project templates introduced in Visual Studio 2013.
Automating common deployment tasks that are not automated out of the box
- ASP.NET Web Deployment using Visual Studio: Deploying Extra Files.
- Setting Folder Permissions on Web Publish (Sayed Hashimi’s blog).
- How to extend the targets file to include registry settings for a web project package (Web Development Tools blog).
- Extending XML (Web.config) transformation (Sayed Hashimi’s blog). Shows how to create custom XDT transforms.
- Web Deployment Tool (MSDeploy) Custom Provider Take 1 (Sayed Hashimi’s blog). Shows how to create a Web Deploy custom provider.
- How to package and deploy COM components (Web Development Tools blog).
- How to package .NET assemblies (Web Development Tools blog). How to deploy assemblies to the GAC.
- Script Out Everything - Initialize Your Windows Azure VM for Your Web Server with IIS, Web Deploy and Other Stuff (Tugberk Ugurlu’s blog).
Configuring web servers so that developers can deploy web applications to them using Web Deploy
- Installing and Configuring Web Deploy for Administrator and non-administrator Deployments (IIS.net site).
Configuring servers for a hosting provider
- Microsoft ASP.NET 4 Hosting Deployment Guide (Microsoft Download Center).
- Generate a Profile XML File (IIS.net site).
Troubleshooting deployment problems
- Troubleshooting Windows Azure Web Sites in Visual Studio (Microsoft Azure site).
- ASP.NET Web Deployment using Visual Studio: Troubleshooting.
- Troubleshooting Common Problems With Web Deploy.
- Web Deploy Error Codes (IIS.net site).
- Web Deployment FAQ for Visual Studio and ASP.NET (MSDN).
- Core Differences Between IIS and the ASP.NET Development Server.
- Common Configuration Differences Between Development and Production.
- Hosting ASP.NET Applications in Medium Trust (4 Guys from Rolla site).
Getting help with a specific deployment question
Additional Resources
This section provides links to additional resources that are useful for learning more about how to use Visual Studio and IIS deployment tools.
The following blogs frequently contain information about Visual Studio web deployment:
The following resources provide documentation about Web Deploy, the IIS framework that Visual Studio uses to perform web application project deployment tasks. You can ask questions about Web Deploy in the Web Deployment Tool forum on the IIS.net web site.
- Introduction to Web Deploy.
- Installing and Configuring Web Deploy.
- PowerShell Scripts for Automating Web Deploy Setup.
- Web Deployment Tool. Top-level table of contents node for Web Deploy documentation on the TechNet site. Includes useful reference information but most of the TechNet pages have not been updated for years.
- Microsoft.Web.Deployment Namespace. API documentation, has not been updated since version 1.0.
- The Microsoft Web Deployment Team blog.
- Publish tab in IIS.net web site.
|