Re: ADSI script for IIS 5.0 can not run in IIS 6.0

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 11/21/04


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
>
>
>


Relevant Pages

  • The server "" timed out....
    ... When trying to Publish from FP2003 to my ISP's server, ... the process is failing after about 20 seconds, ... returning the following error message: ... Using FP to upload individual files to the ISP works ...
    (microsoft.public.frontpage.client)
  • RE: The object invoked has disconnected from its clients.
    ... The latest server Usage Report email only contained this error message. ... It is recommended that you contact Microsoft Customer ... Support Services via telephone so that a dedicated Support ... Professional can assist you recover the server in a more efficient manner. ...
    (microsoft.public.windows.server.sbs)
  • Re: startx fails
    ... Subject: startx fails ... Have you looked in the paths shown in the error message? ... configure the netscape http server. ... install, or one on which people have done lots of patches? ...
    (comp.unix.sco.misc)
  • Re: Publishing WebForms to Production System
    ... Its already Off but same error message. ... <!-- CUSTOM ERROR MESSAGES ... Set trace enabled="true" to enable application trace logging. ... > and upload the modified web.config file to your server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Publishing WebForms to Production System
    ... Its already Off but same error message. ... <!-- CUSTOM ERROR MESSAGES ... Set trace enabled="true" to enable application trace logging. ... > and upload the modified web.config file to your server. ...
    (microsoft.public.dotnet.framework.aspnet)