programming4us
programming4us
SECURITY

Publishing ASP.NET Web Applications : MSDeploy Publish

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
10/10/2010 3:28:12 PM
One of the new features in deploying Web applications is the Microsoft Web Deployment Tool, also known as MSDeploy that is a command-line tool included in the .NET Framework 4 and which can build advanced deployment scripts. MSDeploy is an advanced tool in that it can
  • Publish Web applications and their settings.

  • Deploy SQL Server databases.

  • Direct advanced deployment to Internet Information Services web servers.

  • Publish GAC, COM, and Registry settings.

MSDeploy is a complex tool, and writing the appropriate command lines can be annoying. Fortunately Visual Studio 2010 allows publishing Web applications via MSDeploy through the Publish Web dialog as demonstrated later. Before getting into that, you need to know how Web applications are packaged before deployment.

Understanding Packages

When you deploy a Web application via MSDeploy, the application is first packaged into one archive that makes deployment easier. The package contains all the required information about the host Web server and files and settings required by the application. You set package information in the Package/Publish Web tab of My Project, as shown in Figure 1.

Figure 1. Setting options for packaging Web applications for deployment.

Here you can find default settings for the local IIS, but you can place settings provided by the system administrator of the target machine. To build the package, simply right-click the project name in Solution Explorer and click Build Deployment Package. Basically the package contains the following elements:

  • The package containing the application and settings

  • The destination manifest, which contains information on how to reach the target server

  • The command line script that will be passed to MSDeploy

When you have your package, you are ready to deploy it with MSDeploy.

Deploy with MSDeploy

Visual Studio 2010 provides the opportunity to deploy Web applications with MSDeploy through its instrumentation. Simply right-click the project name in Solution Explorer and then click Publish. When the Publish Web dialog appears, select the MSDeploy Publish option from the Publish Method combo box. Figure 2 shows how the dialog appears.

Figure 2. Setting options for the MSDeploy publish.


You need to provide some settings to deploy the Web application with MSDeploy, and most of them are given to you by the Administrator of the target server. Table 1 summarizes required settings.

Table 1. Required Settings for MSDeploy Publish
OptionDescription
Service URLThe URL of the MSDeploy service provided by the host or administrator.
Site/ApplicationThe name of the site and application on the target IIS. Here you can include subfolders.
Mark as IIS application on destinationWill mark the application as a root if you specify a subfolder in the Site/Application option. The target server must support this.
Do not delete extra files on destinationWhen unchecked, MSDeploy deletes all files from the target folder before publishing new files. The suggestion is keeping it unchecked only at the first publishing.
Allow Untrusted CertificateAllows host and administrator to use self-signed certificates, according to the administrator instructions.
Username/PasswordCredentials required to access the target IIS, provided by the server administrator.

When you provide all required settings, simply click Publish to get your application deployed to the Web server with MSDeploy, remembering that this tool provides the opportunity to deploy additional requirements such as SQL Server databases and GAC settings.

Other  
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
REVIEW
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
programming4us
 
 
programming4us