3
votes

I've inherited a classic ASP application written in VBScript. I don't have experience with either. I am using Visual Studio 2013 as my development environment.

Please can you let me know whether it is possible to pre-compile ASP files? I just want to be able to view my compilation errors and ensure that the application compiles before running it.

When running the application I'm encountering run-time errors (HTTP status code 500) and I don't know whether this is because of compilation errors or some other reason.

Thanks,

2
Sounds like an ASP.NET web forms app, not classic ASP which is typically written in VBScript. Anyway, see the answers here for enabling detailed error messages: stackoverflow.com/questions/2640526/… - Keith
I was mistaken. It is VBScript not VB.NET. Thank you for the link. - aw1975
Classic ASP isn't compiled, the code is executed at runtime - John

2 Answers

5
votes

As @Tim mentioned, Classic ASP code cannot be compiled. To view detailed code errors follow these steps.

  1. Open IIS Manager
  2. Click on "ASP"

enter image description here

  1. Click "Debugging Properties" and Set the "Send Errors to Browser" option to "True".

enter image description here

2
votes

Classic ASP was VBScript. VB.NET is a .NET technology - they're totally different. Are the extensions asp or aspx?

If it really is VB.NET, you can precompile it.

AFAIK classic ASP can't be precompiled. This was one of the advantages to .NET when it was first released.

Debugging classic ASP used to be a nightmare, too. You may be better off trying to justify converting it than trying to maintain it.