Classic ASP Super Rookie Question

OK, so I recently moved into the world of web development, having spent quite a few years coding in a fairly simple proprietary language, and one of my first works was setting up an old classic ASP page for one of our clients. I am using Visual Studio 2008 to try to debug some problems that I have, but the page does not load at all. If I browse the site locally using IIS, then everything works without any problems, so I'm not sure what I'm doing wrong.

Here is the error message I get:

Compiler Error Message: BC30451: Name 'VariableName' is not declared. 

How this is configured, file1.asp has include for file2.asp

 <!-- #include file=./includes/file2.asp --> 

Then file2.asp has a form message for file3.asp

 <FORM METHOD="POST" ACTION="/includes/file3.asp"> 

A variable is created inside file3.asp.

Thus, when starting this site through IIS everything works, the variables look transferred between the files without any problems, but when I try to debug the site using VS2008, I get error code BC30451.

Can anyone fix my ship? I have done a lot of searches and reading of other websites that seem to handle this problem, but a lot of this happens over my head. If someone can take the time to explain what is happening and why this is happening, as well as give some kind of solution or point me aside somewhere that can help, that would be more than highly appreciated.

Greetings

Pat.

+6
debugging visual-studio asp-classic
source share
2 answers

You can debug classic ASP in Visual Studio 2008. A way to do this involves attaching a debugger to the process on which your ASP pages are running. Remembering that classic ASP debugging only works with IIS; it does not work with VS Development web server (Cassini). Also, make sure you enable ASP debugging in IIS:

IIS Source Directory Properties http://img4.imageshack.us/img4/6431/capturert.png


IIS Application Configuration http://img26.imageshack.us/img26/4802/capture2qr.png

Once you have set up the configuration in IIS as described above, here's how to hook up the debugger:

  • Open classic ASP files in Visual Studio
  • Set a breakpoint anywhere you want to break server code.
  • View the page in a web browser (make sure the host process is running)
  • In Visual Studio: debug menu -> Bind to process
  • Locate the IIS ASP workflow (w3wp.exe on IIS6, dllhost.exe on IIS5.1)
  • Attach the code for the host process to the script (see below, for example)

Attach debugger dialog http://img43.imageshack.us/img43/2218/capturegb.png

At this point, the breakpoint should be anchored, and you should be able to debug classic ASP pages. (you may need to refresh the page in a web browser to get code that will execute again after attaching the debugger)

+6
source share

I have never tried to run classic ASP in VS2008. But this is not a compiled language, and I don’t think you can run a debugger on it. When I did ASP, I just did a bunch of Response.Write for debugging.

-one
source share

All Articles