Create IIS Web Site via ADSI scripting - ISAPI Error
From: StephenMcC (anonymous_at_discussions.microsoft.com)
Date: 05/06/04
- Next message: Michael: "Urgent-Web server allows editing of sites w/out username and password"
- Previous message: Steven Burn: "Re: Is it possible to get info from all sessions"
- Next in thread: David Wang [Msft]: "Re: Create IIS Web Site via ADSI scripting - ISAPI Error"
- Reply: David Wang [Msft]: "Re: Create IIS Web Site via ADSI scripting - ISAPI Error"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 May 2004 10:06:05 -0700
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
.
- Next message: Michael: "Urgent-Web server allows editing of sites w/out username and password"
- Previous message: Steven Burn: "Re: Is it possible to get info from all sessions"
- Next in thread: David Wang [Msft]: "Re: Create IIS Web Site via ADSI scripting - ISAPI Error"
- Reply: David Wang [Msft]: "Re: Create IIS Web Site via ADSI scripting - ISAPI Error"
- Messages sorted by: [ date ] [ thread ]