经典 ASP:不支持 Server.CreateObject

发布于 2024-07-11 11:57:52 字数 602 浏览 9 评论 0原文

当我从经典 ASP 页面调用 Server.CreateObject() 时,我发现

Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method

我已经尝试了以下操作(分别):

Server.CreateObject("Microsoft.XMLHTTP")
Server.CreateObject("MSXML2.XMLHTTP")
Server.CreateObject("MSXML.DOMDocument")

我知道 ActiveX 对象已安装,因为以下 javascript 调用有效

var test = new ActiveXObject("Microsoft.XMLHTTP");
var test = new ActiveXObject("MSXML2.XMLHTTP");
var test = new ActiveXObject("MSXML.DOMDocument");

我正在从本地主机 IIS 服务器调用它。 有什么想法如何解决这个问题吗?

When I call Server.CreateObject(), from my Classic ASP page, I get

Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method

I've tried the following (separately):

Server.CreateObject("Microsoft.XMLHTTP")
Server.CreateObject("MSXML2.XMLHTTP")
Server.CreateObject("MSXML.DOMDocument")

I know the ActiveX objects are installed because the following javascript calls work

var test = new ActiveXObject("Microsoft.XMLHTTP");
var test = new ActiveXObject("MSXML2.XMLHTTP");
var test = new ActiveXObject("MSXML.DOMDocument");

I'm calling it from my localhost IIS server. Any ideas how to troubleshoot this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一身仙ぐ女味 2024-07-18 11:57:52

如果执行以下操作:

Dim x: x = Server.CreateObject("My.ProgID.Here")

...VBScript 创建对象,然后尝试访问存储在“x”中的默认属性。 由于这些对象都没有定义默认属性(特别是带有 [id(DISPID_VALUE)] 的基于 IDispatch 的属性),因此失败并显示“对象不支持此属性或方法”。

你真正想要的是这样的:

Dim x: Set x = Server.CreateObject("My.ProgID.Here")

If you do the following:

Dim x: x = Server.CreateObject("My.ProgID.Here")

...VBScript creates the object and then attempts to access the default property for storing in 'x'. Since none of these objects have a default property defined (specifically an IDispatch-based property with [id(DISPID_VALUE)]), this fails with "Object doesn't support this property or method".

What you actually want is this:

Dim x: Set x = Server.CreateObject("My.ProgID.Here")
屌丝范 2024-07-18 11:57:52

这个怎么样?

Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

或者下载此组件并安装在您的网络服务器上?

http://www.microsoft.com/downloads/details.aspx microsoft.com/downloads/details.aspx?FamilyId=3144B72B-B4F2-46DA-B4B6-C5D7485F2B42&displaylang=en

然后重新启动服务器并重试。

How about this one?

Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

Or downloading this component and installing on your webserver?

http://www.microsoft.com/downloads/details.aspx?FamilyId=3144B72B-B4F2-46DA-B4B6-C5D7485F2B42&displaylang=en

Then restarting the server and trying again.

傾城如夢未必闌珊 2024-07-18 11:57:52

从浏览器调用它们并不意味着它们安装在 IIS 中。

Calling them from the browser doesn't mean that they are installed in IIS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文