Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Microsoft C# Professional Projects - Premier Press.pdf
Скачиваний:
177
Добавлен:
24.05.2014
Размер:
14.65 Mб
Скачать

DEPLOYING THE APPLICATION

Chapter 26

587

 

 

 

 

deployment to a Web server. This is a better option for Web application projects because registration and configuration issues are handled by Visual Studio .NET.

In order to deploy a Web application to a Web server, you create a Web Setup project, build it, copy it to the Web ser ver computer, and run the installer to install the application on the Web server.

Creating a Deployment Project

Perform the following steps in order to create a deployment project for the SkyShark Airlines application.

1.Open your SkyShark Airlines application.

2.On the File menu, point to Add and click on New Project.

3.In the Add New Project dialog box (refer to Figure 26-4), select the Setup and Deployment option from the Project Types: pane and the Setup Project from the Templates: pane.

4.Enter SkySharkDeploy in the Name: text box and the required path in the Location: text box (refer to Figure 26-4).

FIGURE 26-4 The Add New Project dialog box

588Project 4 CREATING AN AIRLINE RESERVATION PORTAL

5.Ensure that the Add to Solution radio button is selected.

6.Click on the OK button to create a deployment project. The File System editor is displayed.

The window of the File System editor is divided into two parts, a navigation pane on the left and a details pane on the right.The navigation pane contains a hierarchical list of folders representing the file system.

The settings of the File System editor can be modified by changing the proper-

 

 

 

L

ties.However, the actual properties are dependent on the project type and the cur-

 

 

 

F

rent selection in the editor. The properties of the File System editor are given in

Table 26-1.

 

 

M

Y

 

 

 

 

 

 

A

 

Table 26-1 File System Editor Properties for Web Application Folder

Property

E

 

 

Description

 

 

T

 

 

AllowDirectoryBrowsing

Sets the IIS DirectoryBrowsing property for the selected folder

AllowReadAccess

 

Sets the IIS Read proper ty for the selected folder

AllowScriptSourceAccess

Sets the IIS Script source access property for the selected folder

AllowWriteAccess

 

Sets the IIS Write property for the selected folder

AlwaysCreate

 

Specifies whether the selected folder is to be created as part of

 

 

installation

 

ApplicationProtection

Sets the IIS Application P rotection property for the selected

 

 

folder

 

AppMappings

 

Sets the IIS Application Mappings property for the selected

 

 

folder

 

Condition

 

Sets the Windows Installer condition that must be satisfied

DefaultDocument

 

Specifies the startup file for the selected folder

ExecutePermissions

 

Sets the IIS Execute Permissions property for the selected folder

Index

 

Sets the IIS Index this resource property for the selected folder

Team-Fly®

 

DEPLOYING THE APPLICATION

Chapter 26

 

589

 

 

 

 

 

 

Table 26-1 File System Editor Properties for Web Application Folder

 

 

(continued)

 

 

 

 

 

 

 

 

 

 

 

 

 

Property

Description

 

 

 

 

 

 

 

 

 

 

 

IsApplication

Specifies whether the IIS application root will be created for the

 

 

 

selected folder

 

 

 

 

 

LogVisits

Sets the IIS Log Visits property for the selected folder

 

 

Name

Specifies the name for the selected folder

 

 

 

 

 

Port

Specifies the port where a Web server is located on the target

 

 

 

computer

 

 

 

 

 

Property

Specifies the named property that can be accessed during installa-

 

 

 

tion to override the path of a custom folder

 

 

 

 

 

VirtualDirectory

Specifies the virtual directory on the Web server where a Web

 

 

 

application will be installed on the target computer

 

 

 

 

 

 

 

 

 

 

 

 

Adding the Output of SkySharkDeploy to the Deployment Project

Perform the following steps to add the project output to the deployment project.

1.Select the Web Application folder.

2.Press F4 to open the Properties window. Set the VirtualDirectory property to SkySharkDeploy.

3.Set the DefaultDocument property to default.aspx.

4.In the File System editor, select the Web Application folder.

5.On the Action menu, point to Add and choose Project Output.

6.In the AddProjectOutputGroup dialog box (refer to Figure 26-5), choose SkyShark from the drop-down list.

590 Project 4 CREATING AN AIRLINE RESERVATION PORTAL

FIGURE 26-5 The AddProjectOutputGroup dialog box

7.Select the Primary output and Content Files from the list and click on OK.

The File System editor is shown in Figure 26-6.

FIGURE 26-6 The File System editor

8. On the Build menu, choose Build SkySharkDeploy.

The SkyShark Airlines application is now ready for deployment. However, the database also needs to be packaged and distributed. For this purpose, you need to