Programatically knowing whether ASP is installed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rahul Apte

    Programatically knowing whether ASP is installed

    How do I programmaticall y check whether ASP and Server Side Includes
    sub-components of the World Wide Web service are installed on a Windows 2003
    Box? I want to do these checks as pre-install checks for a software.

    Thanks in advance.

    - Rahul A.


  • rwg

    #2
    RE: Programatically knowing whether ASP is installed

    Greetings Rahul:

    The short answer is that if IIS is installed, then ASP is installed. It's part of IIS 5, IIS 5.1 and IIS 6.

    The real question, in the case of IIS 5.x, is "Has it been disabled?" In the case of IIS 6, the question is "Has it been Enabled?"

    In IIS 5, ASP can be disabled by user configuration or the Lockdown Tool. Not on this, but it can be disabled at the web site level, but enabled at one or
    more of the Application or Virtual Directory levels. For example, in the two web site configuration below ...

    . MasterWebSettin gs (IIS settings)
    . . Main Web SIte (Default web site)
    . . . Exchange
    . . . Order Entry Applicaiton
    . . . CRM Application
    . . . Personal Application
    . . Test Web Site (answering on port 8080 )
    . . . Order Entry Applicaiton
    . . . CRM Application
    . . . Personal Application

    I could have ISAPI filter mapping of ASP files to 404.dll (to return a 404 error) on the MasterWebSettin g, no mapping at the Main Web Site (so it uses
    MasterWebSettin gs) but have ASP pages mapped to ASP.DLL on the Order and Personal Application and not on the CRM. On the Test Web Site, I
    could set the ASP mapping at the web site level and not set anything on the three applications, yet ASP pages work. Copy a working ASP page CRM on
    the Test Web Site from to the Main Web Site and it will not work.

    IIS 6 has these same issues with the addition of WebSvcExtRestri ctionList which can have ASP turned off even when it's turned on for all web sites and
    applications. When you install IIS 6, ASP is turned off here by default.

    In addition to this some antivirus programs will block ASP anyway.

    The best way to test if ASP works in your application is to write a simple ASP hello work page. If that serves, then ASP works. If not, then ASP does not
    work.

    But if you want to, you can write a script to test version levels and see if Asp seems to be setup correctly. In c:\INetPub\Admi nscripts there is adsutil.vbs.
    Using this program, you can issue commands like this:
    Cscript adsutil.vbs get W3SVC/ScriptMaps
    If one of the lines returned, looks like this:
    ".asp,C:\WINNT\ system32\inetsr v\asp.dll,5,GET ,HEAD,POST,TRAC E"
    Then ASP is turned on at the MasterWeb level. If it looks like this,
    ".asp,E:\WINNT\ system32\inetsr v\404.dll,1,GET ,HEAD,POST,TRAC E"
    Then ASP is turned off at the MasterWeb Level

    Next you could test the first web site like this:
    Cscript adsutil.vbs get W3SVC/1/root/ScriptMaps
    If you get no hits, then the MasterWeb level makes the decision, and so on.

    Adsutil.vbs is VB script. You can look at this program to see how to programmaticall y code to check IIS configuration.

    -rwg
    This is what I think, not necessarily what is accurate!

    --------------------
    | From: "Rahul Apte" <apterahul@redi ffmail.com>
    | Subject: Programatically knowing whether ASP is installed
    | Date: Thu, 11 Mar 2004 19:21:10 +0530
    | Lines: 9
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.3790.0
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Message-ID: <OFVQr$2BEHA.12 36@TK2MSFTNGP11 .phx.gbl>
    | Newsgroups: microsoft.publi c.inetserver.as p.general
    | NNTP-Posting-Host: smtp2.ensim.com 202.56.203.193
    | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
    | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.inetserver.as p.general:26807 7
    | X-Tomcat-NG: microsoft.publi c.inetserver.as p.general
    |
    | How do I programmaticall y check whether ASP and Server Side Includes
    | sub-components of the World Wide Web service are installed on a Windows 2003
    | Box? I want to do these checks as pre-install checks for a software.
    |
    | Thanks in advance.
    |
    | - Rahul A.
    |
    |
    |


    Comment

    Working...