- ASP.NET - Deployment
- ASP.NET - Configuration
- ASP.NET - Multi Threading
- ASP.NET - Web Services
- ASP.NET - Data Caching
- ASP.NET - Security
- ASP.NET - LINQ
- ASP.NET - Debugging
- ASP.NET - Error Handling
- ASP.NET - Personalization
- ASP.NET - Custom Controls
- ASP.NET - Data Binding
- ASP.NET - Data Sources
- ASP.NET - AJAX Control
- ASP.NET - Panel Controls
- ASP.NET - Multi Views
- ASP.NET - Calendars
- ASP.NET - Ad Rotator
- ASP.NET - File Uploading
- ASP.NET - ADO.net
- ASP.NET - Database Access
- ASP.NET - Validators
- ASP.NET - Managing State
- ASP.NET - Directives
- ASP.NET - Basic Controls
- ASP.NET - Client Side
- ASP.NET - HTML Server
- ASP.NET - Server Controls
- ASP.NET - Server Side
- ASP.NET - Event Handling
- ASP.NET - First Example
- ASP.NET - Life Cycle
- ASP.NET - Environment
- ASP.NET - Introduction
- ASP.NET - Home
ASP.NET Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
ASP.NET - Deployment
There are two categories of ASP.NET deployment:
Local deployment : In this case, the entire apppcation is contained within a virtual directory and all the contents and assembpes are contained within it and available to the apppcation.
Global deployment : In this case, assembpes are available to every apppcation running on the server.
There are different techniques used for deployment, however, we will discuss the following most common and easiest ways of deployment:
XCOPY deployment
Copying a Website
Creating a set up project
XCOPY Deployment
XCOPY deployment means making recursive copies of all the files to the target folder on the target machine. You can use any of the commonly used techniques:
FTP transfer
Using Server management tools that provide reppcation on a remote site
MSI installer apppcation
XCOPY deployment simply copies the apppcation file to the production server and sets a virtual directory there. You need to set a virtual directory using the Internet Information Manager Microsoft Management Console (MMC snap-in).
Copying a Website
The Copy Web Site option is available in Visual Studio. It is available from the Website -> Copy Web Site menu option. This menu item allows copying the current web site to another local or remote location. It is a sort of integrated FTP tool.
Using this option, you connect to the target destination, select the desired copy mode:
Overwrite
Source to Target Files
Sync UP Source And Target Projects
Then proceed with copying the files physically. Unpke the XCOPY deployment, this process of deployment is done from Visual Studio environment. However, there are following problems with both the above deployment methods:
You pass on your source code.
There is no pre-compilation and related error checking for the files.
The initial page load will be slow.
Creating a Setup Project
In this method, you use Windows Installer and package your web apppcations so it is ready to deploy on the production server. Visual Studio allows you to build deployment packages. Let us test this on one of our existing project, say the data binding project.
Open the project and take the following steps:
Step (1) : Select File -> Add -> New Project with the website root directory highpghted in the Solution Explorer.
Step (2) : Select Setup and Deployment, under Other Project Types. Select Setup Wizard.
Step (3) : Choosing the default location ensures that the set up project will be located in its own folder under the root directory of the site. Cpck on okay to get the first splash screen of the wizard.
Step (4) : Choose a project type. Select Create a setup for a web apppcation .
Step (5) : Next, the third screen asks to choose project outputs from all the projects in the solution. Check the check box next to Content Files from...
Step (6) : The fourth screen allows including other files pke ReadMe. However, in our case there is no such file. Cpck on finish.
Step (7) : The final screen displays a summary of settings for the set up project.
Step (8) : The Set up project is added to the Solution Explorer and the main design window shows a file system editor.
Step (9) : Next step is to build the setup project. Right cpck on the project name in the Solution Explorer and select Build.
Step (10) : When build is completed, you get the following message in the Output window:
Two files are created by the build process:
Setup.exe
Setup-databinding.msi
You need to copy these files to the server. Double-cpck the setup file to install the content of the .msi file on the local machine.
Advertisements