[thelist] ASP and GetObject....

Ken Schaefer ken at adOpenStatic.com
Tue Mar 11 20:14:01 CST 2003


I would strongly suspect that it is a permissions issue. The IISAdmin pages
that also manipulate the metabase do not allow anonymous access - instead
you need to authenticate using local administrator credentials (under which
context those pages are run).

To get a better description of the error message, remove "On Error Resume
Next", which may help confirm your suspicions.

To solve the problem either:
a) change the user account this page runs under (not recommended)
-or-
b) deny anonymous access and authenticate using an account that has the
necessary privileges
-or-
c) write a component to do the work, and run it under COM+ (I think this
will work as well)

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Anthony Baratta" <Anthony at Baratta.com>
Subject: [thelist] ASP and GetObject....


: Howdy folks...
:
: I'm trying to get information from the IIS (v5) Metabase. My test code
: works with VBS, but fails with ASP.
:
: e.g.
:      On Error Resume Next
:      Set w3svc = GetObject("IIS://" & varComputerName & "/w3svc")
:      If Err.Number = 0 Then
:           ''Connect worked, go do stuff
:      Else
:           ''Connect Failed
:           response.write Err.Number
:      End If
:      On Error GoTo 0
:
: When I print the Err.Number, I get "70". Which of course means nothing to
: me. ;-P
:
: I think this is a permissions error, e.g. IIS running as the Anonymous
: Account, so it doesn't have permissions to invoke that object.
:
: Clues? Clue bats?
: --
: Anthony Baratta



More information about the thelist mailing list