Re: Create IIS Web Site via ADSI scripting - ISAPI Error

From: StephenMcC (anonymous_at_discussions.microsoft.com)
Date: 05/07/04


Date: Fri, 7 May 2004 06:41:02 -0700

Hi,

Seemed to get a resolution for this. The code was originally written to install the web site (excluding the ISAPI filter) on a Win2K box running IIS 5 and so alot of the web site security had to be explicitly expressed (ie: Read,Write, Execute, Debug ASP and Buffering etc). Some of these settings where causing problems, I think coming from what I hear that Win2k's security was left open and needed tied down where required, while Win2003 is tied down by default.

I started with a working baseline, removing all access/security properties and gradually added thses until I got the same error, seemed to be the 'AppAllowDebugging, AppAllowClientDebug ..' propertis etc.

It wasn't the ISAPI filter or how it was being added but how the site was being set up via the script. Used the web MetaSchema (MetaEdit) to compare properties/settings for a manual and scripted web site which helped 2 raise these issues.

Thanx for ur help.

Stephen.
     
     ----- David Wang [Msft] wrote: -----
     
     You did not show the code snippet of how you added the Filter.
     
     Are you saying that when you do all the configuration manually through the
     UI that everything works? That is, the application works, the Filter works,
     etc. When you try to script the configuration, then nothing works?
     
     The reason why your hand-created filter does not show any status (even when
     you've made a request), while when running in IIS5 Isolation mode it shows
     priority/status is due to an obscure interaction between the design of the
     UI, worker process, and service runtime state over the last 6 years. You
     only see this if you hand-create the website in the manner you did -- if you
     used the ADSI function CreateWebSite, this would not happen, and that is my
     recommended solution to having the filter status show up in the UI in both
     IIS6 modes.
     
     As for your claim of "but still the app fails!?" -- I have no idea how you
     are customizing server behavior with ISAPI and what "fails" means, so I
     really cannot help further. Does the app work when you manually configure
     it on IIS6, or does it fail regardless.
     
     --
     //David
     IIS
     This posting is provided "AS IS" with no warranties, and confers no rights.
     //
     "StephenMcC" <anonymous@discussions.microsoft.com> wrote in message
     news:6DD8915C-EDC5-40F2-A1A2-37E8234B671E@microsoft.com...
     Hi All,
     
     I need to create an IIS Web Site but I want to script this and as part of
     the scripting process I want to add an ISAPI filter.
     
     When I create the IIS web site manually it all works swimmingly, but when I
     script the app it doesn't work.
     
     I have a sinking feeling that the script isn't creating the web site with
     the correct properties, ie when creating via the IIS create web site
     dialogue, on step 4 (i tink) I set the 'Read, Run and Execute ( ... For
     ISAPI dll's ... )' properties.
     
     When I look at the ISAPI filter it has a prority of 'Unknown', which from
     what I read is the default until a request is made on the site, but the site
     isn't working as the ISAPI dll is used to authenticate access etc. So I'm
     knida' fecked!
     
     When I run IIS in 'Run WWW service in IIS 5.0 isolation mode' the ISAPI dll
     comes up with a priority of 'High' with a green arrow, but still the app
     fails!?
     
     I'm running on 2003 and using ADSI script (.vbs) to create the IIS (6.0)
     web. I've droped some sample script below to give u an idea of how i'm doin'
     tings!
     
     Has anyone else come across this problem ??
     
     Thanx 2 All,
     
     Stephen.
     
     ----
     ----
     Get the IIS:w3svc obj/collection and get an instance for the new web
     ----
     ----
     
     Set NewWebServer = w3svc.Create("IIsWebServer", intCount)
     NewWebServer.ServerComment = sComment
     
     NewWebServer.ServerBindings = NewBindings
     NewWebServer.KeyType = "IIsWebServer"
     
     NewWebServer.AuthAnonymous = True
     NewWebServer.AccessRead = True
     NewWebServer.AccessExecute = True
     NewWebServer.AccessScript = True
     NewWebServer.SetInfo
     
     ' --------------------------------------------------------------------
     ' CREATE ROOT DIRECTORY
     ' now create the root directory object.
     ' --------------------------------------------------------------------
     Set NewDir = NewWebServer.Create("IIsWebVirtualDir", "Root")
     NewDir.Path = sRootDir
     Call NewDir.AppCreate(True)
     NewDir.AppFriendlyName = "Root"
     NewDir.KeyType = "IIsWebVirtualDir"
     NewDir.AuthAnonymous = True
     NewDir.AccessRead = True
     NewDir.AccessExecute = True
     NewDir.AccessScript = True
     NewDir.SetInfo
     
     NewDir.Start
     
     
     ..
     
     
     



Relevant Pages

  • Re: Create IIS Web Site via ADSI scripting - ISAPI Error
    ... You did not show the code snippet of how you added the Filter. ... When you try to script the configuration, ... When I create the IIS web site manually it all works swimmingly, ...
    (microsoft.public.inetserver.iis)
  • CREATE USER AND DEFINE NTFS PERMISSIONS
    ... create a web site and FTP site on IIS. ... Do you have an example script I can work with? ...
    (microsoft.public.windows.server.scripting)
  • Re: 404 handler mkicks in before ISAPI filter
    ... an ISAPI Filter WILL be able to do all those URL ... its simply a case of the IIS ... >>I installed an ISAPI filter that translates "forward slashes" at the ... >> then the 404 handler for the default web site kicks in BEFORE the ...
    (microsoft.public.inetserver.iis)
  • Add ISAPI filter throug script
    ... I was wondering if anybody know how to add a ISAPI filter into IIS 6.0 ... through script? ... Prev by Date: ...
    (microsoft.public.scripting.vbscript)
  • Checking active sessions from DOS
    ... Is there a way to check whether there are active sessions ... on an IIS 4.0 web site? ... script that checks for active ...
    (microsoft.public.inetserver.iis)