There are currently two types of ASP.NET deployments:
Local deployment : In this case, the entire application is contained in a virtual directory, and all content and assemblies are contained within it and can be used by the application.
Global deployment : In this case, the component can be used by every application running on the application server.
However, there are many different technologies that we can utilize during deployment. Below we will discuss the most common and simplest deployment methods:
XCOPY deployment
Copy a website
Create a settings project
XCOPY deployment means recursively copying all files to the target folder on the target computer. You can use any of the following common techniques:
FTP transfer
Use server management tools that provide replication to remote sites
MSI installer app
XCOPY deployment simply copies the program files to the production server and sets up a virtual directory there. You need to use the Internet Messaging Microsoft Management Console (MMC snap-in) to set up the virtual directory.
Copying the website is an option available in Visual Studio. This is available in the Website -> Copy Web Site menu option. This menu item allows copying the current website to another local or remote location. It is an integrated FTP tool.
Use the following options to connect to your destination to select the desired replication mode:
cover
From source to target file
Synchronize source and target projects
Then physically copy the files. Unlike XCOPY deployment, this process is deployed from the Visual Studio environment. However, the following two or more deployment methods have the following problems:
You passed along your source code.
There are no precompiled and error-checked files.
Initial page loading will be slow.
In this approach, you use Windows Installer and package the Web application so that it can be deployed on a production server. Visual Studio allows you to create deployment packages. So let's test one of our existing projects, the data binding solution.
Open the project and take the following steps:
Step (1) : Select File -> Add -> New Project, using the website root directory displayed in Solution Explorer.
Step (2) : Select Setup and Deployment under Other Project Types, and then select Setup Wizard.
Step (3) : Select the default location and ensure that the project will be created under your own folder site in the root directory. Click Okay and we get the first screen of the wizard.
Step (4) : Select the project type. Select 'Create a setup for a web application'.
Step (5) : Next, the third screen is to select project output from all projects in the solution. Check the checkbox next to 'Content Files from...'
Step (6) : The fourth screen allows the inclusion of additional files such as a readme. However, in our case there was no such document. Click Finish.
Step (7) : The final screen displays a summary of the setting items.
Step (8) : Add the setup project to the Solution Explorer and a file system editor will be displayed in the main design window.
Step (9) : The next step is to create the installation project. Right-click the project name in Solution Explorer and select Build.
Step (10) : When the creation is completed, you will get the following information in the output window:
Two files are created during the build process:
Setup.exe
Setup-databinding.msi
You need to copy these files to the server. Double-click the installation file on your local machine to install the contents of the MSI file.