This documentation is archived and is not being maintained.

Upgrading WebClass Projects to Visual Basic .NET

Visual Basic 6.0 WebClass projects (also known as IIS Application projects) can be upgraded to ASP.NET Web Application projects using the Upgrade wizard. The process for upgrading WebClass projects is essentially the same as for any other project type; however, there are some issues that you will want to be aware of.

In order to upgrade a WebClass project, there are two prerequisites:

  • Internet Information Services (IIS) must be installed and running on the upgrade computer
  • You must have Administrative privileges that allow you to install applications.

When a WebClass project is upgraded, by default the project will be created with a new project name of projectname.NET (where projectname is the name of the Visual Basic 6.0 project). This name is then used when naming the virtual directory. This virtual directory will also be configured as an application in IIS; the Application Friendly name will be the projectname.

If the virtual directory name already exists on the http://localhost server (typical in a repeat upgrade scenario), a number will be appended to the virtual directory and project names in order to ensure uniqueness.

When a Visual Basic 6.0 WebClass project is upgraded to Visual Basic .NET, the .asp file for the project is upgraded to an .aspx file. Any references to the .asp file within an HTML template file are not automatically changed to .aspx references. These are not upgraded because a template file might contain references to other .asp files that were not part of the WebClass project.

In addition, when files are copied to the new project directory during upgrade, only HTML template files are copied. Any other .html files or image files are not copied to the new directory.

When adding HTML files to a Visual Basic .NET project, they are added as Content files by default. When a WebClass project is upgraded, HTML files are added as Embedded Resources. If you add HTML Files to the project after upgrading, you must set their Build Action property to Embedded Resource in order to make them visible to the application.

Tip   You can still reference an HTML file that is not embedded by providing a full path to the file when calling WriteTemplate.

If you have never created an ASP.NET Web Application before upgrading your first Visual Basic 6.0 WebClass project, you will need to set the Visual Basic .NET project's StartUp object by right-clicking the .aspx file and selecting Set As Start Page from the shortcut menu before running the upgraded project.

See Also

WebClass Changes in Visual Basic .NET | Upgrading Applications Created in Previous Versions of Visual Basic