Sunday, May 22, 2011

Running Classic ASP on IIS 7

As if I'm not discussing enough different unrelated technologies in this blog, today's topic is Microsoft's IIS.

In the past couple of months I suddenly found myself having to write Classic ASP.  I had done such a project in the past, using IIS 5.   However this was IIS 7, and my old sample scripts were not working.

Here were the problems, and their solutions.

1) Classic ASP is not on by default.
You have to enable it yourself:
Control Panel -> Programs and Features -> Turn Windows Features on or off -> IIS -> WWW Services -> App Dev Services -> ASP : check

2) Set to send errors to browser
Problem: Was receiving in my browser window the following (the error itself was probably the one described in number 3 below).
An error occurred on the server when processing the URL. Please contact the system administrator
Solution:
IIS Manager -> ASP -> Debugging Properties -> Send Errors to Browser -> True

3) Must enable parent path expression ".."
Problem: Was receiving in my browser window the following.
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/NPCS/Transformer/Android/Restaurant/Transform.asp, line 6
The Include file '../../Common/Util.js' cannot contain '..' to indicate the parent directory.
Solution:
IIS Manager -> ASP -> Debugging Properties -> Enable Parent Paths -> True

Hope this helps anyone suffering through the same.

No comments: