CLASSIC ASP apps in Civil Aviation
CIVAV Classic ASP apps:
AMES
CARAC NPA Int
EMS
CAETAS - SAFAC
FOAEA - AEOEF
NDWL - LWND
SCRAM
The following classic ASP apps are decommissioned:
CAPMS
CORRAL
TSBL MMS
LLS
ACTS v2
CAIMS
CAIPS
Working with Classic ASP
References: The following document, from TC Marine, explains how to debug a Classic ASP with Visual Studio 2017+: Debug Classic ASP with Visual Studio 2017+
Classic ASP in Visual Studio 2022
This example is based on the CARAC application.
Launch Visual Studio 2022
On the File menu, select New and then click Project.
In the Templates pane, select “Blank Solution”
We need to attach the existing Classic ASP web site to the solution File \ Add \ Existing Web Site. In the file dialog that open navigate to the Drive\ Folder containing the site. In this case the Site was on the server and mapped to a P drive.
Once the Site is loaded modify the IIS Express configuration file for ASP. The applicationhost.config file can be found in the folder where you created the solution in the .vs\config folder. In this sample the file is found at C:\Dev\MSDTS\.vs\config\applicationhost.config.
Edit the applicationhost.config and under <system.webServer>, find <asp>:
<asp scriptErrorSentToBrowser="true">
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
<limits />
</asp>
And change it to
<asp scriptErrorSentToBrowser="true" enableParentPaths="true" bufferingOn="true"
errorsToNTLog="true" appAllowDebugging="true" appAllowClientDebug="true">
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates"/>
<session allowSessionState="true" />
<limits />
</asp>
As some of the Classic ASP sites were made up of a hierarchy of sites in the solution explorer navigate to the site that you wish to debug. You just need to select the folder. When ready start the website without debugging (Ctrl-F5 or Debug \ Start without Debugging). This is important as you will not be able to properly debug the ASP Scripts if you select Start with debugging. IIS Express needs to build the directory structure as it loads so it may take some time to load depending on the number of folders contained in the ASP solution.
Note: Visual Studio will default to running the site in the Edge Browser if you don’t want this you will need to change the Web Browser setting for VS.
Once the App is started in Visual Studio open the Debug \ Attach to Process dialog. Notice “Attach to: has a default of Automatic: Native Code and in order to debug ASP this needs to be changed to Script. Click the Select… button to change it
Now attach to the IIS Express process. (If the iisexpress.exe process is greyed out you may have run the website in debug mode. In this case stop the site and the Visual Debugger and reload without debugging.)
If IIS Express is running multiple websites there will be multiple instances of iisexpress.exe. If this is the case then you need to know your sites Process ID (PID). You can
find this out be looking at the IIS Express Site list. Find the IIS Express Icon and right click to select the Show All Applications list. This will give you the PID for the site.
Now the website can be debugged in Visual Studio and the Solution Explorer will show the triggered .asp files and the relationships to the include files.
In order to debug a page you must first navigate to it to load it into the Script documents view in Solution Explorer. Once loaded you can then open the script file and set and break points you need and then navigate back to the page to hit the set breakpoints. Using this you can trace code and inspect any variables defined in the scripts. You can also add variables to the watch window, set conditional breakpoints, move the execution point, etc.
NOTE:
For some of the sites they relied on the paths for some parent folders that are not part of the solution but are however part of the overall PC Website structure.
For Example: In MSDTS it was dependent on the images and includes folders at the root level of the tcappsroot directory. What we did was to just copy these over to our local drives to maintain the structure and allow the application to load correctly. We decided not to add these files to TFS as they are not part of the application and did not want to risk updating them. See the image below for an example of how we structured the project for Visual Studio and TFS.