[thelist] Re: ASP and GetObject....
Neil Moodley
Neil.Moodley at uk.wdsglobal.com
Wed Mar 12 06:23:36 CST 2003
Hi
Try Server.GetObject instead...
rgds
Neil
-----Original Message-----
From: thelist-request at lists.evolt.org
[mailto:thelist-request at lists.evolt.org]
Sent: None
To: thelist at lists.evolt.org
Subject: thelist Digest, Vol 1, Issue 5
Date: Tue, 11 Mar 2003 18:00:27 -0800
From: Anthony Baratta <Anthony at Baratta.com>
To: "Evolt Mailing List"<thelist at lists.evolt.org>
Subject: [thelist] ASP and GetObject....
Message-ID: <5.1.0.14.2.20030311175402.032714d0 at mail.areamail.net>
Content-Type: text/plain; charset="us-ascii"; format=flowed
MIME-Version: 1.0
Precedence: list
Reply-To: "evolt.org mailing list devoted to the web"
<thelist at lists.evolt.org>
Message: 11
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
President
Keyboard Jockeys
"Conformity is the refuge of the unimaginative."
------------------------------
Date: Wed, 12 Mar 2003 13:14:01 +1100
From: "Ken Schaefer" <ken at adOpenStatic.com>
To: "evolt.org mailing list devoted to the web" <thelist at lists.evolt.org>
Subject: Re: [thelist] ASP and GetObject....
Message-ID: <029e01c2e83d$0cc54860$0a345e81 at careersAD.unsw.edu.au>
References: <5.1.0.14.2.20030311175402.032714d0 at mail.areamail.net>
Content-Type: text/plain;
charset="iso-8859-1"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Precedence: list
Reply-To: "evolt.org mailing list devoted to the web"
<thelist at lists.evolt.org>
Message: 12
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