大网数据广告活动
Web服务器与PHP

Can't create object when ASP applications run

· 52CE 我爱测

This article provides resolutions for the Cannot create object error that occurs when ASP applications run.

This article helps you resolve the error (Cannot create object) that occurs when an Active Server Pages (ASP) application runs.

Original product version:   Active Server Pages
Original KB number:   201740

Symptoms

When an ASP application runs, you might receive the following errors:

Application Event Log error:

Failed on creation from object context: CoCreateInstance (ProgId: ADODB.Connection.1.5) (CLSID: {ID}) (Microsoft Transaction Server Internals Information: File: d:\viper\src\runtime\context\ccontext.cpp, Line: 1292)

Browser error:

Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object /test.asp, line 1

The line in the ASP file reads as follows:

<% set db = Server.CreateObject("ADODB.Connection") %>

Cause

This problem is related to the permissions granted to your dynamic link libraries (DLLs). The IUSR_computer and IWAM_computer accounts (where computer is the name of the machine) don't have the permissions necessary to execute the DLLs being instantiated on the Server.CreateObject line in the ASP code.

Resolution

The IUSR_computer and IWAM_computer accounts must be granted read permissions to the \<drive letter>: \Program Files\Common Files\System\ADO directory.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 12/17/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。