RAD Studio for Microsoft .NET |  |

Using the ASP.NET Deployment Manager
See Also
Collapse All

You can add an ASP.NET Deployment Manager to an ASP.NET application project to assist you with deploying the application. The Deployment Manager determines which files are required for deployment, requests the destination directory name and connection information, and then copies the files to the destination directory. The Deployment Manager generates a list of files to copy based on the names of the files in your project directory, but you can include or exclude files as needed.

You can use the right mouse button, when the Deployment Manager window is displayed, to see options for displaying, copying, deleting, modifying, and filtering destination files.

When the Show Assembly References option is enabled, the Deployment Manager window displays all of the assemblies referenced by the project. The system assemblies are shown, but disabled (grayed). These disabled assemblies can't be deployed.

The External Files.... option allows you to pick the external files that you want to deploy. A dialog box with a check list box is pre-populated with the BDP database libraries, since one of these often needs to be deployed. You can also add files to the list using a FileOpen dialog. The list box has a column that indicates the destination subdirectory for the external file. You can edit the destination path. The files that are checked when you click OK will be shown in the Deployment Manager.

See the links at the end of this topic for more information about the right-click options for the Deployment Manager.

Considerations

- To enable IIS debugging of RAD Studio applications , during the installation of RAD Studio, the install program requested permission to update the machine.config file on your computer. If you replied Yes to that prompt, CodeGear debugger information was written to machine.config. If you replied No to that prompt, that debugger information is written to the application web.config file when you create an ASP.NET application with RAD Studio. Before deploying the application, you should disable debugging to optimize the application, as described in the following procedure. Additionally, if you chose not to update machine.config, you should remove references to the CodeGear debugger modules in web.config, because those modules might not be available on the deploy target computer.
- Consider maintaining a separate web.config file for deployment purposes. For example, you might maintain a file named web.config.deploy and rename it to web.config during deployment. Use the Deployment Manager Change Destination Filename command to rename the file.
- You can create the destination directory while using the Deployment Manager, however, you will then need to use IIS to create the virtual directory before using the application. Alternatively, you can deploy to an existing virtual directory.
- When deploying to an FTP site, the Deployment Manager will retain your FTP connection information. You may save your FTP connection password, however, it will be saved as unencrypted, plain text.
- You can add multiple Deployment Managers to an ASP.NET project and configure them to deploy to different destination directories.
- Some of the commands that are available in the Deployment Manager are also available in the Project Manager context menu.

To remove debugger references in the web.config file

1. In the IDE or a text editor, open the web.config file that you will use for the deployed ASP.NET application.
2. In the <compilation> section, change debug="true" to debug="false".
3. Skip this step if you chose to update machine.config during the installation of RAD Studio (see the Considerations above for details). Remove or comment out the following references to the CodeGear debugger assembly and modules:

Copy Code

    <assemblies>
         <add assembly="Borland.dbkasp, Version=9.0.0.1,
                              Culture=neutral, PublicKeyToken=b0524c541232aae7"/>
    </assemblies>

    <httpModules>
         <add name="DbgConnect" type =
                              "Borland.DbkAsp.DbkConnModule,Borland.dbkasp,Version=9.0.0.1, Culture=neutral,
                              PublicKeyToken=b0524c541232aae7"/>
    </httpModules>

1. Save the file and recompile the application.

To deploy an ASP.NET application

1. In the IDE, open the ASP.NET application project to be deployed.
2. Choose FileNewOtherDeploymentASP.NET Deployment and click OK. (The Deployment node is not displayed in the New Items dialog box unless an ASP.NET project is open.) The Deploy tab is displayed and a .bdsdeploy file is added to the project directory and displayed in the Project Manager. The files required for deployment are listed on the left side of the Deploy tab under Source Files.
   Tip: Only files that have been saved are displayed in the list; save any new files and refresh the Deployment Manager to display the files.
3. In the Destination drop-down list, select either Folder Location or FTP Location. If you select Folder Location, the Browse For Folder dialog box is displayed. You can select an existing directory or click Make New Folder to create a new one. If you select FTP Location, the FTP Site dialog box is displayed. Enter the connection information. Click Help for an explanation of each field. Click OK to return to the Deployment Manager.
4. If you selected an FTP location, check the Connected check box to connect and display the files, if any, in the destination directory.
5. Review the files in the Source Files list. Click a file to display detailed file information in the text box below the file list.
6. To copy all of the files to the destination directory, click the Copy All New or Modified Files to Destination button on the toolbar at the top of the Deployment Manager. The files are copied immediately to the destination directory and displayed in the Destination Files list. To modify the file list, right-click anywhere in the file list and use the context menu commands, or use the file list status buttons, as described below.
   Tip: To select a file in the list, click the file name. To select multiple files, press CTRL
   and click the files. To select a range of files, press CTRL+SHIFT, click the first file in the range and then the last file in the range.

Context Menu Command | Description
Refresh | Redisplays the Deployment Manager to reflect changes in the file lists.
Copy Selected File(s) to Destination | Copies the selected files to the destination directory.
Delete Selected Destination File(s) | Deletes the selected files from the destination directory after displaying a confirmation prompt for each file.
Change Destination Filename | Displays a dialog for renaming the selected file in the destination directory.
Copy All New and Modified Files to Destination | Copies all of the files marked with to the destination directory. This command is also available on the Deployment Manager toolbar and by right-clicking the .bdsdeploy node in the Project Manager.
Delete All Destination Files Not in Project | Deletes any of the files marked with from the destination directory after displaying a confirmation prompt for each file.
Show Ignored Groups and Files | Displays all of the files in the project directory, even those that are not required to deploy the application.
Ignore Group(s) | Causes the selected file to be ignored by the Deployment Manager.
Ignore File(s) | Causes all of the files in a node of the source files list to be ignored by the Deployment Manager.
Enable Logging | Logs the operations performed by the Deployment Manager in a file named DeployLog.txt in the project directory.
View Log | Displays the log file in the default text editor.

1. When you are satisfied with the deployment criteria, save your changes to the .bdsdeploy file. When you reopen the project, you can open the Deployment Manager from the Project Manager and deploy the application as is, or modify the deployment criteria as described above.

The following buttons indicate the status of the files in the file list and can be used to copy or delete the file, as described below.

File List Status Button | Description
| The file is eligible to copy (it does not exist in the destination directory, or the source file has changed since it was last copied to the destination). Click the button to copy the file to the destination directory.
| The file exists in the destination directory, but not in the project directory. You can probably safely delete it from the destination directory. Click the button to delete the file from the destination directory.
| The status of the file in the is unknown. It might have a later time stamp than the file in the project directory. Click the button to replace the file in the destination directory.

To create an IIS virtual directory for a new destination directory

1. Open IIS on the computer where you deployed the application. On Windows XP, for example, choose StartControl PanelAdministrative ToolsInternet Information Services.
2. In the Internet Information Services dialog box, expand the tree view to display the local computer node.
3. Right-click the Default Web Site node and choose NewVirtual Directory. The Virtual Directory Creation Wizard is displayed.
4. Follow the prompts on each page of the wizard to create the virtual directory.

For more information about virtual directories, refer to the IIS online Help system.
See Also

Deploying ASP.NET Applications

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!