3

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,

aw1975
  • 1,669
  • 3
  • 20
  • 35
  • 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: http://stackoverflow.com/questions/2640526/detailed-500-error-message-asp-iis-7-5 – Keith Apr 23 '15 at 17:48
  • I was mistaken. It is VBScript not VB.NET. Thank you for the link. – aw1975 Apr 23 '15 at 17:57
  • 1
    Classic ASP isn't compiled, the code is executed at runtime – John Apr 23 '15 at 18:56

2 Answers2

5

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

WorkSmarter
  • 3,738
  • 3
  • 29
  • 34
  • "Send Errors to Browser" was already set to true for me. I am using IE 11. What enabled me to view the details errors was to uncheck the IE browser setting "Show friendly HTTP error messages" in Tools -> Internet Options -> Advanced . – aw1975 Apr 25 '15 at 07:39
2

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.

Tim
  • 4,051
  • 10
  • 36
  • 60
  • Sorry it is VBScript, not VB.Net. I have amended my question. – aw1975 Apr 23 '15 at 17:55
  • OK, so you can't precompile it. The problem may be you're running the debugging web server. You may want to install and set up IIS Express - that's all I can think of that may help you get this running and provide more information. (It does support classic ASP) http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-express-overview – Tim Apr 23 '15 at 17:59