Microsoft ASP Site Deployment Guide (1): Introduction to Deployment

Source: Internet
Author: User
Tags compact hosting visual studio 2010

1. Overview

This series of tutorials guides you on how to deploy an ASP. NET Web application to a third-party host provider Machine. Deployed in a way that is One-click published by Visual Studio. First deploy to the development environment on IIS to test and then deploy to the production environment (third-party host providers).

The series includes a total of 11 chapters and a troubleshooting chapter: It seems a lot of content, a little dizzy, right? In fact, the basic process of deploying a production environment is a small part of this series, but in a realistic environment it is necessary to understand some seemingly small but important information-for example, to set permissions on a folder on the target server. So, in this tutorial, we have a lot of this information that we hope you can use to successfully deploy your system.

This series of tutorials is continuous, not separate chapters. However, if a chapter does not affect you, you can also learn the next chapter directly (however, there may be some impact when studying).

Reading objects

This tutorial is for an ASP. NET developer for a small or midsize company, or the following:

    1. No use of continuous integration (automated compilation and Deployment) system
    2. Build environment is a shared third-party provider
    3. Superman type (one person undertakes development, testing, deployment work)

In an enterprise environment, continuous integration is used almost everywhere, and the build environment is its own server. Different people have different roles. Deployment of this situation we may have another tutorial to talk about in the future, and at the same time, information about more enterprise deployments can be accessed: ASP. NET Deployment Content Map.

Organizations of any size can deploy programs to the Windows Azure Cloud, for articles on Windows Azure deployment, see: Cloud development.

Third-party hosting providers in the tutorial

This tutorial guides you on how to set up an account with a hosting provider, where we've chosen a provider so that we can intuitively experience the process of deployment. Each provider will have different capabilities and experience techniques for deployment. The process described in this tutorial is a very common step in the entire process.

The provider we use is cytanium.com, which is not recognized or recommended for use in the tutorial.

Web application project and Web site project

Contoso University is a visual Studio Web application project where most of the deployment methods and tools are not based on web site projects, and on how to deploy a Web site project, visit: ASP. Deployment Content Map.

ASP. NET Web forms and ASP.

Contoso University is an ASP. NET Web Forms project, but all of the things in this tutorial apply to the ASP. NET MVC project because the visual Studio MVC project is another form of Web application project. The only difference is that if your host does not support ASP. NET MVC or does not support your MVC version, then you need to do extra work to deploy the MVC assembly to your Bin directory.

Programming languages

The sample program uses C # development, but does not require that you will C #, the deployment techniques shown in the tutorial are not related to the language.

Troubleshooting

If a problem is found during deployment, or if the deployed site is not functioning properly and the error message does not find a clue, or does not explain how to resolve it. To help you solve some of the common problems, the 12th chapter provides a list of troubleshooting references, so check this section if you find errors while watching tutorials doing exercises.

Welcome message

Welcome everyone's message, when the tutorial to update the time, will make some good suggestions and the proposed errors are updated to the new version.

2. Prerequisites

Before you begin, make sure that your computer has the following software installed:

    • Windows 7
    • Visual Studio SP1 or Visual Web Developer Express SP1. (Install this, the following will not be installed, because the SP1 and integration.) )
    • Microsoft Visual Studio SP1 Tools for SQL Server Compact 4.0

Additional software may be required to complete the program, but it is not necessary to install it now. If needed, this tutorial will show you the steps to install.

3. Download sample Program

Download sample Program

The program deployed by this tutorial is called Contoso University and has been created for you. It is a very simple university website, and the entity Framework tutorials on the ASP is the same as the program in the net site tutorial.

If the above required software is installed, download the Contoso University program. The ZIP package contains multiple versions of the project and the English version of the tutorial PDF file. Start learning to use Contosouniversity-begin, want to see the results of the final program please use Contosouniversity-end, want to see the 10th Chapter migration data to the formal SQL Please use contosouniversity-aftertutorial09 for future server effects.

You can save the Contosouniversity-begin project to any directory to use, the default directory is:c:\users\<username>\documents\visual Studio 2010\projects

(The project shown in the tutorial is placed in the root directory of the C drive)

Start Visual Studio2010, open the project, Ctrl+f5 run.

You can access the following features from the menu bar on the website:

    1. Show student Statistics statistics (about page)
    2. Display, edit, delete, add students.
    3. Show, edit courses Course
    4. Show, edit instructors Instructor
    5. Show, edit Departments department

Here are the more typical pages:

4. View the program features that affect your deployment

The program features listed below will affect how and what must be deployed, and in the following chapters, each feature will be explained in detail:

  1. Contoso University uses the SQL Server compact database to store data that contains test data and production environment data that need to be excluded from the test data when deployed to a production environment.
  2. The program uses ASP. Membership to store data to the SQL Server Compact database. The program has an administrator account that can have access to restricted information. You need to deploy a membership database with an administrator account (not including a test account).
  3. Because both the program's database and the membership database use the SQL Server Compact, the SQL Server Compact database engine needs to be deployed to third-party hosts in addition to deploying the databases.
  4. The program uses ASP. Universal provider to keep the data in the database, so these provider assemblies also need to be deployed with the program.
  5. The program uses the Entity Framework 4.1 (Code first) to access the data, so the Entity Framework 4.1 Assembly also needs to be deployed with the program.
  6. The program uses third-party error logs and reporting tools. The Assembly of the tool also needs to be deployed with the program. The tool writes the log to an XML file to a folder, so you need to make sure that the ASP. NET account that runs the site has write access to the folder, and that the folder is excluded from deployment (otherwise, the XML log files for the test environment are deployed to the production environment).
  7. Some of the settings of the Web. config used by the program, which have different values in different environments, need to be updated at deployment time, and some settings need to be updated (debug or release) because of different build configurations.
  8. The Visual Studio solution contains a class library project that only needs to deploy the assembly produced by the project without the need to deploy the project itself (for example: CS file).

In this section, you download the sample program and review the program features that affect the deployment, and the next section is to prepare some of the deployment parameters to automate some of the deployment steps, and others to do so manually.

Copyright NOTICE: This article for Bo Master http://www.zuiniusn.com original article, without Bo Master permission not reproduced.

Microsoft ASP Site Deployment Guide (1): Introduction to Deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.