Deploying ASP.NET Applications

来源:互联网 发布:海康威视网络配置 编辑:程序博客网 时间:2024/06/06 05:31

From : http://www.startvbdotnet.com/aspsite/extras/deploy1.aspx

Deploying ASP.NET Applications

Using the Copy Project Option

Another option to deploy your ASP.NET application developed using Visual Studio .NET is to use the copy project option. This option is very helpful if you decide to host your ASP.NET application with a hosting provider. The hosting provider allocates some space for you on his Web server and you are required to deploy your application/Website. To host your ASP.NET application on a hosting provider's server you need to follow these steps.

The first thing you need to do before deploying any ASP.NET Web application is to change the Active Solution Configuration from Debug to Release as shown below. This allows the compiler to optimize the code, remove debugging related symbols from code and makes the code run much faster. To open the Configuration Manager, right-click on the Web project in the Solution Explorer window and select Project->Properties. The properties dialog box looks like the image below.

On this dialog, click on Configuration Properties towards the left and click the "Configuration Manager" button towards the right side. The Configuration Manager dialog looks like the image below.

On this diaolg select Release from the drop-down list found at top-left.

To copy your Web project onto the target server, select Project->Copy Project from the main menu. Selecting this option will display a dialog box as shown in the image below.

The Copy Project dialog provides the following options.

Destination Project Folder

Used to specify the location to which you want to copy the project. The location can be on the same machine or on a remote server.

Web access method

The Web access method option determines the access method that is used to copy the Web project to the destination folder. There two types of Web access methods:

File share: Allows to directly access the project files on the Web server through a file share.
FrontPage: Specifies that you want to use the HTTP-based FrontPage Server Extensions to transfer your project files to the server. 

Copy

The Copy option provides three types which are as follows:

Only files needed to run this application: Copies built output files (DLLs and references from the bin folder) and any content files (.aspx, .asmx). It is recommended to deploy the application using this default option.
All project files: Copies built outputs (DLLs and references from the bin folder) and all files that are in the project. This includes the project file and source files.
All Files in the source project folder: Copies all project files and any other files that are in the project folder (or subfolder) being transferred to the destination folder.

To copy the Web Application, select your options based on the application type from the above dialog box and click OK. This will result in the ASP.NET Web application being deployed on the target server as shown in the image below.

 

Some hosting providers require you to enable FrontPage Extensions on your account which can be done via the control panel.  

 
原创粉丝点击