Using the ASP to Aspnet Migration Assistant

You can use the ASP to ASP.NET Migration Assistant as a wizard through the Visual Studio .NET IDE or as a command-line tool. The next sections describe each of these approaches.

Using the Wizard

To convert your ASP applications using Visual Studio .NET, point to Open on the File menu, and then click Convert. Next, click ASP to ASP.NET Migration Assistant from the list of available converters. If you have a solution open in Visual Studio .NET, you can click Add to current solution to add the result to your current solution. Alternatively, you can click Create new solution if you want the result to be stored as a separate solution.

The wizard contains seven pages that walk you though the procedure of upgrading your ASP files:

1. The Welcome page appears first. Click Next to begin the procedure.

2. Page 2 allows you to specify the directory that contains the files to be upgraded. Type the path to the directory that contains the files you want to convert, or click Browse and use the File Open dialog box to locate it. After the desired directory is located, click Next.

3. Page 3 allows you to specify a name for the project. Type a name for your new ASP.NET application, and then click Next.

4. Page 4 allows you to specify the target directory where the upgraded project will reside. Type the path to the directory where you want to create your new ASP.NET project, or click Browse and use the dialog box to locate it. After the target directory is specified, click Next.

5. Page 5 allows you to specify any absolute references or Uniform Resource Identifier (URI) addresses that you want to upgrade from .asp to .aspx. In general, the ASP to ASP.NET Migration Assistant converts relative addresses to make them refer to the new upgraded files; for example, <A href="../../OtherDirectory/ Default.asp"> ... </a> will be converted to <A href="../../OtherDirectory/ Default.aspx"> ... </a>. It is not convenient to apply this conversion to all URI addresses because some of them can refer to external resources that will not be upgraded and therefore require no changes. To control this situation for URIs and absolute addresses, the user has to specify on this page of the wizard which addresses will be upgraded.

After you specify these references, click Next to continue.

6. Page 6, the Ready to Upgrade page, is provided as an indicator that the upgrade procedure can begin. Click Next to begin the upgrade.

7. Page 7 provides a progress indicator that displays the progress of the migration assistant as it upgrades your files. When the progress indicator is full, the upgrade procedure is complete.

Using the Command Line Tool

The ASPUpgrade.exe command-line tool has the same functionality as the wizard.

The command line syntax for ASPUpgrade.exe is shown here.

ASPUpgrade[.exe] DirectoryName [/out DirectoryName] [/nolog | /logfile filename ]

[/Verbose] [/ProjectName] [/ForceOverwrite]

Table 1 lists the meanings for the options. Table 1: ASPUpgrade.exe Options

Argument Option Description

Table 1 lists the meanings for the options. Table 1: ASPUpgrade.exe Options

Argument Option Description

DirectoryName

Required. The path of the ASP file(s) to be upgraded

/out DirectoryName

Specify the path for the folder where the ASP.NET project will be created. If this option is not specified, the default path is \OutDir.

/verbose

Display all output to the Command Prompt window during the upgrade.

/nolog

Do not create a log file during the upgrade.

/logfile filename

Create a log file using the filename specified (may include full path name if desired). If no path and file name are specified, a log file will be created in the same folder as the ASP.NET project with the default file name ProjectName.log, where ProjectName is the name of the project file.

/? or /help

Display a list of command syntax options.

When using the command-line version of the tool, keep the following in mind:

• Arguments are case insensitive.

• Paths with spaces must be enclosed in double quotation marks.

• If the target directory does not exist, the migration assistant will create it.

• If the target directory already exists, the migration assistant will first verify whether you want to overwrite the contents of this directory.

• You must have write privileges in the target directory.

• You cannot use both the /NoLog and /LogFile options together.

Was this article helpful?

+1 0

Post a comment