Re: ADSI script for IIS 5.0 can not run in IIS 6.0
From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 11/21/04
- Next message: David Wang [Msft]: "Re: Virtual Directory - Permission Denied with fso CopyFile"
- Previous message: David Wang [Msft]: "Re: ISAPI Filter as Proxy"
- In reply to: Henry Zhang: "Re: ADSI script for IIS 5.0 can not run in IIS 6.0"
- Next in thread: Henry Zhang: "Re: ADSI script for IIS 5.0 can not run in IIS 6.0"
- Reply: Henry Zhang: "Re: ADSI script for IIS 5.0 can not run in IIS 6.0"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 21 Nov 2004 00:48:28 -0800
Please narrow down what exactly is failing in your code.
You have given insufficient information on what exactly is failing. This
block of code was also not given in the original question -- so it is
unclear whether the original "issue" was resolved or was a red-herring, etc.
In any case, SiteObj.SetInfo basically commits all the changes you had
done -- so it is not necessarily the "problem". You should be able to
figure out exactly what change is failing to commit by commenting out
property manipulation one by one. Currently, since you do not show any of
the values being set to the properties in question, it is simply not
possible to help you.
Here is documentation for all the properties:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/alphabeticmetabasepropertylist.asp
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Henry Zhang" <Henry Zhang@discussions.microsoft.com> wrote in message
news:FEF0DB75-4A90-40C5-9ECA-5C5853F2941B@microsoft.com...
The error message comes after the running of SiteObj.SetInfo
The same error message also comes after the running of .SetInfo in the
following code in the same program.
With SiteObj
.ServerComment = Website.ServerComment
.LogType = Website.LogEnabled
.LogFileDirectory = Website.LogDirectory
'.LogPluginClsid = GetNCLogCLSID(Website.Computer)
.LogPluginClsid = Website.LogPluginClsid
.LogExtFileFlags = Website.LogExtFileFlags
.LogFilePeriod = 3
.AccessScript = True
.AccessRead = True
.AccessExecute = False
' These properties are common to ROOT dir and to the web server
.AppIsolated = Website.ApplicationIsolation
.DefaultDoc = Website.DefaultPages
.SetInfo
End With
If Err.Number <> 0 Then
strError = "Error Setting Webserver Properties" & Err.Description
UpdateSite = UpdateSite & vbCrLf & strError
m_Debug.LogEvent App.EXEName, "Setting WebServer Properties",
vbLogEventTypeError, 1
Err.Clear
End If
The aim of the program is to create and manage web site hosting in the web
server. The whole package of the program can be found on
http://henryz.webtest.hiway.co.uk/AltoIISAutomation_my/
The files need to be concern is Site.cls and readme.doc. Site.cls gives the
source code.
Thanks,
Henry
"David Wang [Msft]" wrote:
> Your code snippet (after I remove all the non-IIS/ADSI portions) runs
> perfectly for me on IIS6 and IIS5. What is your actual problem?
>
> Can you please determine what function call resulted in "Invalid procedure
> call or argument"?
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "Henry Zhang" <henry.zhang@altohiway.com> wrote in message
> news:93392591.0411180125.4e62ec2a@posting.google.com...
> Hi,
>
> The following code can work in IIS 5.0, but have error message
> "Invalid procedure call or argument " when running on IIS 6.0. Can
> somebody help me to figure it out? Thanks.
>
> Set SiteObj = GetObject("IIS://" & Website.Computer & "/w3svc/" &
> Website.IISID)
>
> ' Set the Bindings we want for the Hosts. So clear them out and
> reset
> If Me.HostCount > 0 Then
> ReDim NewBindings(Me.HostCount)
> For i = 0 To Me.HostCount - 1
> BindingString = Website.Hosts(i).IP & ":" &
> Website.Hosts(i).Port & ":" & Website.Hosts(i).HostName
> m_Debug.LogEvent App.EXEName, "Binding = " &
> BindingString, vbLogEventTypeInformation, 0
> NewBindings(i) = BindingString
> Next
>
> SiteObj.ServerBindings = NewBindings
>
> SiteObj.SetInfo
>
> If Err.Number <> 0 Then
> UpdateSite = UpdateSite & vbCrLf & "Error on Setting up
> Hosts: " & Err.Description
> Err.Clear
> End If
> End If
>
>
>
- Next message: David Wang [Msft]: "Re: Virtual Directory - Permission Denied with fso CopyFile"
- Previous message: David Wang [Msft]: "Re: ISAPI Filter as Proxy"
- In reply to: Henry Zhang: "Re: ADSI script for IIS 5.0 can not run in IIS 6.0"
- Next in thread: Henry Zhang: "Re: ADSI script for IIS 5.0 can not run in IIS 6.0"
- Reply: Henry Zhang: "Re: ADSI script for IIS 5.0 can not run in IIS 6.0"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|