question

ZengJeff-0760 avatar image
0 Votes"
ZengJeff-0760 asked ZengJeff-0760 commented

GetObject("IIS://localhost/W3SVC") error: Cannot create ActiveX component

Our product is a website in IIS and the site uses windows authentication. Our code uses GetObject("IIS://localhost/W3SVC") to get the IIS admin object to check some IIS settings. We often use a user in administrators group to run the feature. It works in most of our customer's environment but failed to create the IIS admin object in one of our customer's environment. The exception is: Cannot create ActiveX component.
For this customer, I wrote a console application which use the same code. I ran it using the same admin user and it can be executed without error.

I guess there may be some IIS or OS settings that makes GetObject failed when it is running in IIS thread.

Can anyone help?

windows-server-iis
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ZengJeff-0760 It's hard to tell what the problem is, can you try looking for related errors in the EventViewer?

0 Votes 0 ·

I found 2 errors. Not sure if they are related to our issue.
1. Application error
Cryptographic Services failed while processing the OnIdentity() call in the System Writer Object.
Details:
AddLegacyDriverFiles: Unable to back up image of binary Microsoft Link-Layer Discovery Protocol.
System Error:
Access is denied.
.

0 Votes 0 ·
  1. Security audit failure
    A handle to an object was requested.
    Subject:
    Security ID: NETWORK SERVICE
    Account Name: HH1SERVER06$
    Account Domain: IMZCLOUD
    Logon ID: 0x3E4

Object:
Object Server: Security
Object Type: File
Object Name: C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\Microsoft\Crypto
Handle ID: 0x0
Resource Attributes: -
Process Information:
Process ID: 0x498
Process Name: C:\Windows\System32\svchost.exe
Access Request Information:
Transaction ID: {00000000-0000-0000-0000-000000000000}
Accesses: ReadAttributes
Access Reasons: ReadAttributes: Not granted
Access Mask: 0x80
Privileges Used for Access Check: -
Restricted SID Count: 0

0 Votes 0 ·

0 Answers